Conversation
Signed-off-by: Kostas Kyrimis <kostas@dragonflydb.io>
| // since we are budy with the replication | ||
| RETURN_ON_ERR(SendCommandAndReadResponse(StrCat("REPLCONF CLIENT-ID ", id_))); | ||
| RETURN_ON_ERR( | ||
| SendCommandAndReadResponse(StrCat("REPLCONF CLIENT-ID ", service_.cluster_family().MyID()))); |
There was a problem hiding this comment.
MyId() falls back to replica id if the cluster_id flag is not set.
There was a problem hiding this comment.
Pull request overview
Fixes a cluster takeover edge case where slot redirection reconciliation can fail when --cluster_node_id is set by ensuring the replica reports the cluster node ID (instead of the replication run-id) during the Dragonfly replication handshake.
Changes:
- Send
REPLCONF CLIENT-IDusingservice_.cluster_family().MyID()rather than the replica’sid_(run-id), aligning replica identity with--cluster_node_idwhen provided.
| RETURN_ON_ERR( | ||
| SendCommandAndReadResponse(StrCat("REPLCONF CLIENT-ID ", service_.cluster_family().MyID()))); |
There was a problem hiding this comment.
I agree. If cloud tests find this issue - we can cover this as well @kostasrim
🤖 Augment PR SummarySummary: Updates the replication handshake to send the node’s cluster ID in 🤖 Was this summary useful? React with 👍 or 👎 |
Fixes #7262