diff options
author | YaacovHazan <31382944+YaacovHazan@users.noreply.github.com> | 2022-02-22 08:59:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 08:59:23 +0200 |
commit | 65e4bce0e79b09a1666753889c0ca4038c235e43 (patch) | |
tree | f1b00352d8a8be5fc48befdca39438eacffef2f9 /tests | |
parent | fad0b0d2a680498fce1cd7e153f8ad7396a79edf (diff) | |
download | redis-65e4bce0e79b09a1666753889c0ca4038c235e43.tar.gz |
fix return value of loadAppendOnlyFiles (#10295)
Make sure the status return from loading multiple AOF files reflects the overall
result, not just the one of the last file.
When one of the AOF files succeeded to load, but the last AOF file
was empty, the loadAppendOnlyFiles will return AOF_EMPTY.
This commit changes this behavior, and return AOF_OK in that case.
This can happen for example, when loading old AOF file, and no more commands processed,
the manifest file will include base AOF file with data, and empty incr AOF file.
Co-authored-by: chenyang8094 <chenyang8094@users.noreply.github.com>
Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/aof-multi-part.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/aof-multi-part.tcl b/tests/integration/aof-multi-part.tcl index 480d336fb..982b6907b 100644 --- a/tests/integration/aof-multi-part.tcl +++ b/tests/integration/aof-multi-part.tcl @@ -45,7 +45,7 @@ tags {"external:skip"} { fail "AOF loading didn't fail" } - assert_equal 1 [count_message_lines $server_path/stdout "appendonly.aof.1.incr.aof doesn't exist"] + assert_equal 1 [count_message_lines $server_path/stdout "appendonly.aof.1.incr.aof .*No such file or directory"] } clean_aof_persistence $aof_dirpath @@ -584,7 +584,7 @@ tags {"external:skip"} { fail "AOF loading didn't fail" } - assert_equal 1 [count_message_lines $server_path/stdout "appendonly.aof doesn't exist"] + assert_equal 1 [count_message_lines $server_path/stdout "appendonly.aof .*No such file or directory"] } clean_aof_persistence $aof_dirpath |