Skip to content

Conversation

@hpatro
Copy link
Collaborator

@hpatro hpatro commented Nov 13, 2025

This prevents crashes on the older nodes in mixed clusters where some nodes are running 8.0 or older. Mixed clusters often exist temporarily during rolling upgrades.

Fixes: #2341

Would need to backport this to 9.0 and 8.1

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.41%. Comparing base (01a7657) to head (abf06e7).
⚠️ Report is 32 commits behind head on unstable.

Files with missing lines Patch % Lines
src/cluster_legacy.c 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2840      +/-   ##
============================================
- Coverage     72.46%   72.41%   -0.05%     
============================================
  Files           128      128              
  Lines         70364    70370       +6     
============================================
- Hits          50986    50961      -25     
- Misses        19378    19409      +31     
Files with missing lines Coverage Δ
src/cluster_legacy.c 87.37% <80.00%> (-0.13%) ⬇️

... and 15 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.

@hpatro hpatro force-pushed the multi_meet_backward_compatibility branch from e482520 to abf06e7 Compare November 13, 2025 23:41
@zuiderkwast zuiderkwast moved this to Todo in Valkey 8.1 Nov 19, 2025
@zuiderkwast zuiderkwast moved this to Todo in Valkey 9.0 Nov 19, 2025
@zuiderkwast zuiderkwast moved this from Todo to In Progress in Valkey 8.1 Nov 19, 2025
@zuiderkwast zuiderkwast moved this from Todo to In Progress in Valkey 9.0 Nov 19, 2025
@zuiderkwast
Copy link
Contributor

zuiderkwast commented Dec 2, 2025

Bump.

This one is a blocker for us for upgrading to 8.1. During upgrade we have a mixed cluster with 8.0 and 8.1.

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Why is this still a draft? Anything missing?

We should include this fix in the next patch release.

Comment on lines +3678 to +3683
/* Check if the node can handle multi meet packet. */
if (flags & CLUSTER_NODE_MULTI_MEET_SUPPORTED) {
sender->flags |= CLUSTER_NODE_MULTI_MEET_SUPPORTED;
} else {
sender->flags &= ~CLUSTER_NODE_MULTI_MEET_SUPPORTED;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really need this code, because CLUSTER_NODE_MULTI_MEET_SUPPORT == CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED and we already have the same code for CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED. We rely on them being equal for the compatibility logic (e.g. when running a mixed cluster with 8.1.0 and 8.1.5).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dead code but added for folks not to get confused.

Copy link
Member

@madolson madolson Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not have dead code? I was also confuse while reviewing this code. It's better to just have a note that adds the extra explanation no?

Or better yet. Add a high level FEATURE_FLAGS mask and then do;

sender->flage &= ~FEATURE_FLAGS;
sender->flags |= flags & FEATURE_FLAGS;

@hpatro
Copy link
Collaborator Author

hpatro commented Dec 2, 2025

LGTM. Why is this still a draft? Anything missing?

I think the code is good. However, couldn't create a test to reproduce the issue.

@zuiderkwast
Copy link
Contributor

LGTM. Why is this still a draft? Anything missing?

I think the code is good. However, couldn't create a test to reproduce the issue.

OK, then I'd like to merge this as is. I trust it because it modifies only the if added in https://github.com/valkey-io/valkey/pull/1307/files#diff-2515500619600c5a1e7a8d9aaa8761a6071314cd226c3b7ee4d0e054691f0a8eR4976 to resend the MEET.

@zuiderkwast zuiderkwast marked this pull request as ready for review December 3, 2025 16:14
@zuiderkwast zuiderkwast merged commit 8ec9381 into valkey-io:unstable Dec 3, 2025
55 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to To be backported in Valkey 8.1 Dec 3, 2025
@github-project-automation github-project-automation bot moved this from In Progress to To be backported in Valkey 9.0 Dec 3, 2025
zuiderkwast pushed a commit to zuiderkwast/placeholderkv that referenced this pull request Dec 3, 2025
…key-io#2840)

This prevents crashes on the older nodes in mixed clusters where some
nodes are running 8.0 or older. Mixed clusters often exist temporarily
during rolling upgrades.

Fixes: valkey-io#2341

Signed-off-by: Harkrishn Patro <[email protected]>
@zuiderkwast zuiderkwast moved this from To be backported to 8.1.5 (not yet released) in Valkey 8.1 Dec 3, 2025
zuiderkwast pushed a commit to zuiderkwast/placeholderkv that referenced this pull request Dec 4, 2025
…key-io#2840)

This prevents crashes on the older nodes in mixed clusters where some
nodes are running 8.0 or older. Mixed clusters often exist temporarily
during rolling upgrades.

Fixes: valkey-io#2341

Signed-off-by: Harkrishn Patro <[email protected]>
zuiderkwast pushed a commit that referenced this pull request Dec 4, 2025
This prevents crashes on the older nodes in mixed clusters where some
nodes are running 8.0 or older. Mixed clusters often exist temporarily
during rolling upgrades.

Fixes: #2341

Signed-off-by: Harkrishn Patro <[email protected]>
@zuiderkwast zuiderkwast moved this from To be backported to 9.0.1 (WIP) in Valkey 9.0 Dec 4, 2025
zuiderkwast pushed a commit to zuiderkwast/placeholderkv that referenced this pull request Dec 4, 2025
…key-io#2840)

This prevents crashes on the older nodes in mixed clusters where some
nodes are running 8.0 or older. Mixed clusters often exist temporarily
during rolling upgrades.

Fixes: valkey-io#2341 

Signed-off-by: Harkrishn Patro <[email protected]>
@madolson
Copy link
Member

madolson commented Dec 8, 2025

I dislike this change still. Why are we not fixing the actual fix for the double meets? @hpatro @zuiderkwast We have to maintain this code forever no?

@zuiderkwast
Copy link
Contributor

I dislike this change still.

@madolson I didn't know you dislike the fix.

I felt it was quite urgent. Now, I have already backported this fix to 8.1 and released it in 8.1.5. It was a blocker for us for upgrading to 8.1. We got this crash during upgrade when we have mixed clusters with 8.0 and 8.1.

Why are we not fixing the actual fix for the double meets?

Two reasons:

  1. Users would have to upgrade to that 8.0.x patch version before continuing to 8.1 to avoid the crashes.
  2. We would have had to backport a number of changes to 8.0. These fixes were depending on each other and other and it became quite large and non-trivial to backport. Hari's conclusion in [CRASH] Crash in Valkey 8.0.3 during downgrade from Valkey 8.1.0 #2341 (comment) was to do this fix instead.

We have to maintain this code forever no?

Yes, we maintain all compatibility checks forever, including if a node supports light-weight pubsub messages, and all things like that. This one follows the same style and it's not more complex than the other checks. Actually it's smaller than most other compatibility checks.

zuiderkwast pushed a commit that referenced this pull request Dec 9, 2025
This prevents crashes on the older nodes in mixed clusters where some
nodes are running 8.0 or older. Mixed clusters often exist temporarily
during rolling upgrades.

Fixes: #2341 

Signed-off-by: Harkrishn Patro <[email protected]>
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.5
Status: 9.0.1

Development

Successfully merging this pull request may close these issues.

[CRASH] Crash in Valkey 8.0.3 during downgrade from Valkey 8.1.0

3 participants