Skip to content

Commit

Permalink
Fix redis-check-aof incorrectly considering data in manifest format a…
Browse files Browse the repository at this point in the history
…s MP-AOF (#12958)

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 da727ad)
  • Loading branch information
enjoy-binbin authored and hwware committed May 29, 2024
1 parent 168da8b commit 7bc3a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/aof.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ tags {"aof external:skip"} {

test {Test valkey-check-aof for old style rdb-preamble AOF} {
catch {
exec src/valkey-check-aof tests/assets/rdb-preamble.aof
exec src/valkey-check-aof tests/assets/rdb-preamble.aof
} result
assert_match "*Start checking Old-Style AOF*RDB preamble is OK, proceeding with AOF tail*is valid*" $result
}
Expand Down

0 comments on commit 7bc3a04

Please sign in to comment.