Repository navigation
Fix meet failure when connecting to a replica - #1435
Merged
Vasileios Zois (vazois) merged 3 commits intoNov 14, 2025
Merged
Conversation
Mathieu Tremblay (Mathos1432)
marked this pull request as ready for review
November 13, 2025 22:51
Copilot started reviewing on behalf of
Mathieu Tremblay (Mathos1432)
November 13, 2025 22:51
View session
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a failure that occurs when running a MEET command on a new node targeting a replica of the cluster. The issue was that when a fresh node receives a gossip merge message, it has no slot information, causing ownerId to be 0 (RESERVED_WORKER_ID), which has a null NodeId.
- Added a null-safety check to prevent accessing workers[0].Nodeid when ownerId is RESERVED_WORKER_ID
- Added a test case to validate the cluster meet from replica scenario
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/cluster/Server/ClusterConfig.cs | Added condition to check currentOwnerId != RESERVED_WORKER_ID before accessing workers[currentOwnerId].Nodeid to prevent null reference |
| test/Garnet.test.cluster/ClusterNegativeTests.cs | Added test case ClusterMeetFromReplica to validate the fix by simulating a meet command from a fresh node to a replica |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Vasileios Zois (vazois)
approved these changes
Nov 14, 2025
Vasileios Zois (vazois)
deleted the
users/matrembl/null-after-failover
branch
November 14, 2025 05:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are seeing failures when trying to run a MEET command on a new node targeting a replica of the cluster.
This change adds a check to make sure it no longer fails, and a test to validate the scenario.