From 7bc3a0465e6e85d63cad4e4455adfda8f23698e3 Mon Sep 17 00:00:00 2001 From: Binbin Date: Tue, 12 Mar 2024 14:47:43 +0800 Subject: [PATCH] Fix redis-check-aof incorrectly considering data in manifest format as 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 da727ad445a640950baa097124070468a0316cc9) --- tests/integration/aof.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index 6a074fbeff..f1ea73d2a0 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -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 }