mirror of https://github.com/apache/cassandra
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
This commit is contained in:
parent
50c314eaec
commit
59d57e3eb7
|
|
@ -1,4 +1,5 @@
|
|||
5.1
|
||||
* Avoid potential gossip thread deadlock during decommission (CASSANDRA-21143)
|
||||
* Improve construction of consensus groups for range movements (CASSANDRA-21142)
|
||||
* Support compaction_read_disk_access_mode for cursor-based compaction (CASSANDRA-21147)
|
||||
* Allow value/element indexing on frozen collections in SAI (CASSANDRA-18492)
|
||||
|
|
|
|||
|
|
@ -2194,16 +2194,6 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean,
|
|||
toSend.forceNewerGenerationUnsafe();
|
||||
toSend.markDead();
|
||||
VersionedValue value = StorageService.instance.valueFactory.left(tokens, computeExpireTime());
|
||||
|
||||
if (left.equals(getBroadcastAddressAndPort()))
|
||||
{
|
||||
// Adding local state bumps the value's version. To keep this consistent across
|
||||
// the cluster, re-fetch it before broadcasting.
|
||||
Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS_WITH_PORT, value);
|
||||
value = Gossiper.instance.endpointStateMap.get(getBroadcastAddressAndPort())
|
||||
.getApplicationState(ApplicationState.STATUS_WITH_PORT);
|
||||
}
|
||||
|
||||
toSend.addApplicationState(ApplicationState.STATUS_WITH_PORT, value);
|
||||
GossipDigestAck2 payload = new GossipDigestAck2(Collections.singletonMap(left, toSend));
|
||||
logger.info("Sending app state with status {} to {}", value.value, sendTo);
|
||||
|
|
|
|||
Loading…
Reference in New Issue