valkey icon indicating copy to clipboard operation
valkey copied to clipboard

Trigger a save of the cluster configuration file before shutting down

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

The cluster configuration file is the metadata "database" for the cluster. It is best to trigger a save when shutdown the server, to avoid inconsistent content that is not refreshed.

enjoy-binbin avatar Jul 24 '24 03:07 enjoy-binbin

Codecov Report

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

Project coverage is 70.28%. Comparing base (0053429) to head (f69f803). Report is 56 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #822      +/-   ##
============================================
- Coverage     70.64%   70.28%   -0.37%     
============================================
  Files           112      113       +1     
  Lines         61531    61732     +201     
============================================
- Hits          43467    43386      -81     
- Misses        18064    18346     +282     
Files with missing lines Coverage Δ
src/cluster_legacy.c 85.39% <100.00%> (-0.11%) :arrow_down:
src/server.c 88.56% <100.00%> (-0.01%) :arrow_down:

... and 19 files with indirect coverage changes

codecov[bot] avatar Jul 24 '24 03:07 codecov[bot]

Test failure on the PR seems unrelated. We should put effort on stabilizing these tests. :|

*** [err]: Empty-shard migration target is auto-updated after failover in target shard in tests/unit/cluster/slot-migration.tcl
incorrect slot state on R 0: expected [609->-7163d8afa4ecd66656c474a3d4547ad1d35f6716]; got [609->-b5854de4879d64bdbafb24cf90e81fdd04a8b9e8]
*** [err]: Empty-shard migration source is auto-updated after failover in source shard in tests/unit/cluster/slot-migration.tcl
incorrect slot state on R 0: expected [609->-7163d8afa4ecd66656c474a3d4547ad1d35f6716]; got [609->-b5854de4879d64bdbafb24cf90e81fdd04a8b9e8]
Cleanup: may take some time... OK

hpatro avatar Jul 26 '24 17:07 hpatro

we are saving nodes.conf in beforeSleep, and event save it without fsync, there is a time gap i think, and shutdown has its own save seems good to me (it doesn't need to care about the others.)

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