Skip to content

CASSANDRA-20910: Harden final alive admission for foreign nodes#4647

Open
arup-chauhan wants to merge 7 commits intoapache:cassandra-4.1from
arup-chauhan:Cassandra-4.1-ring-mismatch-repro
Open

CASSANDRA-20910: Harden final alive admission for foreign nodes#4647
arup-chauhan wants to merge 7 commits intoapache:cassandra-4.1from
arup-chauhan:Cassandra-4.1-ring-mismatch-repro

Conversation

@arup-chauhan
Copy link

Summary

Follow-up hardening for CASSANDRA-20910 on 4.1.

This PR adds a regression test and a minimal final-admission guard so a foreign-identity endpoint cannot be marked alive in the realMarkAlive path.

This is a companion, stacked follow-up to #4618

What This PR Changes

  • Adds testRealMarkAliveRejectsForeignClusterNode in GossiperTest
  • Adds an early return in Gossiper.realMarkAlive(...) when maybeBelongsInCluster(...) is false

Invariant Enforced

  • A peer with mismatched cluster identity must never transition into live membership, including at final alive admission.

Test Plan

Using JDK 11:

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

Validation performed:

- Before fix: new test fails (Foreign endpoint should not be admitted to live endpoints)
- After fix: GossiperTest passes

@arup-chauhan arup-chauhan changed the title Cassandra 4.1 ring mismatch repro CASSANDRA-20910: Harden final alive admission for foreign nodes Mar 2, 2026
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