Skip to content

CASSANDRA-20910: Add repro test to prove ring mismatch rejection#4646

Closed
arup-chauhan wants to merge 1 commit intoapache:trunkfrom
arup-chauhan:ring-mismatch-repro
Closed

CASSANDRA-20910: Add repro test to prove ring mismatch rejection#4646
arup-chauhan wants to merge 1 commit intoapache:trunkfrom
arup-chauhan:ring-mismatch-repro

Conversation

@arup-chauhan
Copy link

Summary

This PR adds regression coverage for CASSANDRA-20910 to ensure foreign nodes are rejected during gossip SYN handling and cannot be admitted into membership state and is a companion PR to the existing #4618

What This Adds

  • New test class: org.apache.cassandra.gms.GossipDigestSynVerbHandlerTest
  • rejectsForeignClusterNameWithoutAdmission
  • rejectsForeignPartitionerWithoutAdmission

Invariants Covered

  • A node with mismatched cluster identity must not be admitted.
  • A node with mismatched partitioner must not be admitted.

Assertions

For both mismatch cases, tests verify:

  • mismatch warning is logged (ClusterName mismatch / Partitioner mismatch)
  • gossip message is not processed forward (lastProcessedMessageAt unchanged)
  • endpoint is not added to membership state (endpointStateMap / liveEndpoints)

Test Plan

JDK11_HOME=$(jenv prefix 11.0.30)
JAVA_HOME="$JDK11_HOME" PATH="$JAVA_HOME/bin:$PATH" ant -Duse.jdk11=true testsome -Dtest.name=org.apache.cassandra.gms.GossipDigestSynVerbHandlerTest
JDK11_HOME=$(jenv prefix 11.0.30)
JAVA_HOME="$JDK11_HOME" PATH="$JAVA_HOME/bin:$PATH" ant -Duse.jdk11=true testsome -Dtest.name=org.apache.cassandra.gms.GossiperTest

Signed-off-by: Arup Chauhan <arupchauhan.connect@gmail.com>
@arup-chauhan
Copy link
Author

arup-chauhan commented Mar 2, 2026

This had overlapping work with original #4618, hence closing in favor of #4647

@arup-chauhan arup-chauhan deleted the ring-mismatch-repro branch March 2, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant