Skip to content

Commit 59d57e3

Browse files
committed
Remove potential gossip deadlock during decommission
Remove unnecessary updating of local app state when leaving Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-21143
1 parent 50c314e commit 59d57e3

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
5.1
2+
* Avoid potential gossip thread deadlock during decommission (CASSANDRA-21143)
23
* Improve construction of consensus groups for range movements (CASSANDRA-21142)
34
* Support compaction_read_disk_access_mode for cursor-based compaction (CASSANDRA-21147)
45
* Allow value/element indexing on frozen collections in SAI (CASSANDRA-18492)

src/java/org/apache/cassandra/gms/Gossiper.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,16 +2194,6 @@ public void unsafeBroadcastLeftStatus(InetAddressAndPort left,
21942194
toSend.forceNewerGenerationUnsafe();
21952195
toSend.markDead();
21962196
VersionedValue value = StorageService.instance.valueFactory.left(tokens, computeExpireTime());
2197-
2198-
if (left.equals(getBroadcastAddressAndPort()))
2199-
{
2200-
// Adding local state bumps the value's version. To keep this consistent across
2201-
// the cluster, re-fetch it before broadcasting.
2202-
Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS_WITH_PORT, value);
2203-
value = Gossiper.instance.endpointStateMap.get(getBroadcastAddressAndPort())
2204-
.getApplicationState(ApplicationState.STATUS_WITH_PORT);
2205-
}
2206-
22072197
toSend.addApplicationState(ApplicationState.STATUS_WITH_PORT, value);
22082198
GossipDigestAck2 payload = new GossipDigestAck2(Collections.singletonMap(left, toSend));
22092199
logger.info("Sending app state with status {} to {}", value.value, sendTo);

0 commit comments

Comments
 (0)