valkey icon indicating copy to clipboard operation
valkey copied to clipboard

Flip pfail flag while marking node as failed

Open hpatro opened this issue 7 months ago • 3 comments

This fail logic was added in #1191, we should also clear the pfail flag in this case.

hpatro avatar Apr 26 '25 09:04 hpatro

Codecov Report

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

Project coverage is 71.00%. Comparing base (0b94ca6) to head (72ce517). Report is 79 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2012      +/-   ##
============================================
- Coverage     71.01%   71.00%   -0.01%     
============================================
  Files           123      123              
  Lines         66033    66115      +82     
============================================
+ Hits          46892    46945      +53     
- Misses        19141    19170      +29     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.41% <100.00%> (+0.32%) :arrow_up:

... and 25 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 Apr 26 '25 09:04 codecov[bot]

Why?

Can this difference be observed by users at all?

As far as I understand, the cluster node state transition from PFAIL to FAIL and both of these are mutually exclusive and shouldn't exist together. So, I think finding the below response under CLUSTER NODES is incorrect.

> ./valkey-cli cluster nodes | grep fail?
511676acd16696d5b8767aa6c4a8ba54c69b70a0 :0@0 master,fail?,fail,noaddr - 1745372213541 0 1993 disconnected

hpatro avatar Apr 28 '25 14:04 hpatro

looks like we do a similar change here in markNodeAsFailingIfNeeded. It is called in clusterCron and through cluster gossip.

sarthakaggarwal97 avatar Apr 28 '25 21:04 sarthakaggarwal97

Backport this one? Is it a follow-up of #1191 which is included in 8.1.

zuiderkwast avatar May 27 '25 19:05 zuiderkwast