valkey icon indicating copy to clipboard operation
valkey copied to clipboard

Fix aof base suffix when modifying aof-use-rdb-preamble during rewrite

Open enjoy-binbin opened this issue 1 year ago • 1 comments

If we modify aof-use-rdb-preamble in the middle of rewrite, we may get a wrong aof base suffix. This is because the suffix is concatenated by the main process afterwards, and it may be different from the beginning.

We cache this value when we start the rewrite.

enjoy-binbin avatar Aug 11 '24 09:08 enjoy-binbin

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.38%. Comparing base (7424620) to head (7963ce1). Report is 76 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #886      +/-   ##
============================================
- Coverage     70.39%   70.38%   -0.02%     
============================================
  Files           112      112              
  Lines         61465    61467       +2     
============================================
- Hits          43271    43263       -8     
- Misses        18194    18204      +10     
Files with missing lines Coverage Δ
src/aof.c 80.07% <100.00%> (+0.01%) :arrow_up:
src/server.h 100.00% <ø> (ø)

... and 11 files with indirect coverage changes

codecov[bot] avatar Aug 11 '24 10:08 codecov[bot]

Looks good. Another option is to reject the config change during rewrite?

zuiderkwast avatar Aug 27 '24 04:08 zuiderkwast

Another option is to reject the config change during rewrite?

yes, this also make sense, the two options work for me, there is another discusstion in #887

enjoy-binbin avatar Aug 27 '24 04:08 enjoy-binbin

Another option is to reject the config change during rewrite?

This may be a breaking change in some ways, @zuiderkwast i am going to keep this one, do you have other thoughts?

enjoy-binbin avatar Sep 01 '24 13:09 enjoy-binbin

Include in 8.0?

zuiderkwast avatar Sep 07 '24 03:09 zuiderkwast

yes. It is a small bug

enjoy-binbin avatar Sep 07 '24 15:09 enjoy-binbin