• Binbin's avatar
    Fix redis-check-aof incorrectly considering data in manifest format as MP-AOF (#12958) · 439b8da4
    Binbin authored
    The check in fileIsManifest misjudged the manifest file. For example,
    if resp aof contains "file", it will be considered a manifest file and
    the check will fail:
    ```
    *3
    $3
    set
    $4
    file
    $4
    file
    ```
    
    In #12951, if the preamble aof also contains it, it will also fail.
    Fixes #12951.
    
    the bug was happening if the the word "file" is mentioned
    in the first 1024 lines of the AOF. and now as soon as it finds
    a non-comment line it'll break (if it contains "file" or doesn't)
    
    (cherry picked from commit da727ad4)
    439b8da4
redis-check-aof.c 18 KB