valkey icon indicating copy to clipboard operation
valkey copied to clipboard

Check for duplicate nodeids when loading nodes.conf

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

For corrupted (human-made) or program-error-recovered nodes.conf files, check for duplicate nodeids when loading nodes.conf. If a duplicate is found, panic is triggered to prevent nodes from starting up unexpectedly.

The node ID is used to identify every node across the whole cluster, we do not expect to find duplicate nodeids in nodes.conf.

enjoy-binbin avatar Nov 17 '25 09:11 enjoy-binbin

This is very unusual? Only human edited nodes.conf and similar errors?

yes, i did manually edited and test it locally, and the node attributes were overridden in various ways. Adding a safeguard doesn't seem like a bad thing.

enjoy-binbin avatar Nov 17 '25 12:11 enjoy-binbin

Codecov Report

:x: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 72.45%. Comparing base (4a0e20b) to head (d2db058). :warning: Report is 22 commits behind head on unstable.

Files with missing lines Patch % Lines
src/cluster_legacy.c 70.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #2852   +/-   ##
=========================================
  Coverage     72.44%   72.45%           
=========================================
  Files           128      128           
  Lines         70487    70497   +10     
=========================================
+ Hits          51066    51078   +12     
+ Misses        19421    19419    -2     
Files with missing lines Coverage Δ
src/cluster_legacy.c 87.39% <70.00%> (-0.16%) :arrow_down:

... and 11 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 17 '25 12:11 codecov[bot]

@enjoy-binbin Let's merge it?

zuiderkwast avatar Dec 17 '25 03:12 zuiderkwast