Skip to content

Reset failover failed primary rank when doing a manual failover - #2226

Merged
enjoy-binbin merged 1 commit into
valkey-io:unstablefrom
enjoy-binbin:minor_fix
Jun 18, 2025
Merged

enjoy-binbin merged 1 commit into
valkey-io:unstablefrom
enjoy-binbin:minor_fix

Conversation

@enjoy-binbin

Copy link
Copy Markdown
Member

This rank was added in #1018, we should reset it to zero when doing
the manual failover, just like we reset failover auth rank.

It affects subsequent log printing. When there is a manual failover
and there are multiple primaries failure, Start of election will
print a confusing log.

This rank was added in valkey-io#1018, we should reset it to zero when doing
the manual failover, just like we reset failover auth rank.

It affects subsequent log printing. When there is a manual failover
and there are multiple primaries failure, `Start of election` will
print a confusing log.

Signed-off-by: Binbin <[email protected]>
@enjoy-binbin
enjoy-binbin requested a review from zuiderkwast June 17, 2025 14:17
@codecov

codecov Bot commented Jun 17, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.57%. Comparing base (81e0051) to head (0845ddf).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2226      +/-   ##
============================================
- Coverage     71.58%   71.57%   -0.02%     
============================================
  Files           122      122              
  Lines         66766    66767       +1     
============================================
- Hits          47794    47787       -7     
- Misses        18972    18980       +8     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.73% <100.00%> (-0.03%) ⬇️

... and 6 files with indirect coverage changes

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

@enjoy-binbin
enjoy-binbin merged commit ceb09b0 into valkey-io:unstable Jun 18, 2025
@enjoy-binbin
enjoy-binbin deleted the minor_fix branch June 18, 2025 02:27
@zuiderkwast

Copy link
Copy Markdown
Contributor

Backport to which versions?

@enjoy-binbin

Copy link
Copy Markdown
Member Author

it was added in 8.1, if we want to backport, that is the version

@enjoy-binbin enjoy-binbin moved this to To be backported in Valkey 8.1 Jun 18, 2025
ranshid pushed a commit to ranshid/valkey that referenced this pull request Jun 18, 2025
…ey-io#2226)

This rank was added in valkey-io#1018, we should reset it to zero when doing
the manual failover, just like we reset failover auth rank.

It affects subsequent log printing. When there is a manual failover
and there are multiple primaries failure, `Start of election` will
print a confusing log.

Signed-off-by: Binbin <[email protected]>
@ranshid ranshid moved this from To be backported to In Progress in Valkey 8.1 Sep 30, 2025
ranshid pushed a commit to ranshid/valkey that referenced this pull request Sep 30, 2025
…ey-io#2226)

This rank was added in valkey-io#1018, we should reset it to zero when doing
the manual failover, just like we reset failover auth rank.

It affects subsequent log printing. When there is a manual failover
and there are multiple primaries failure, `Start of election` will
print a confusing log.

Signed-off-by: Binbin <[email protected]>
@ranshid ranshid moved this from In Progress to 8.1.4 in Valkey 8.1 Sep 30, 2025
@ranshid ranshid moved this from 8.1.4 to To be backported in Valkey 8.1 Sep 30, 2025
zuiderkwast pushed a commit that referenced this pull request Oct 1, 2025
This rank was added in #1018, we should reset it to zero when doing
the manual failover, just like we reset failover auth rank.

It affects subsequent log printing. When there is a manual failover
and there are multiple primaries failure, `Start of election` will
print a confusing log.

Signed-off-by: Binbin <[email protected]>
@zuiderkwast zuiderkwast moved this from To be backported to 8.1.4 in Valkey 8.1 Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 8.1.4

Development

Successfully merging this pull request may close these issues.

3 participants