[
https://issues.apache.org/jira/browse/CASSANDRA-9156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefania updated CASSANDRA-9156:
--------------------------------
Component/s: Distributed Metadata
> Make the echo callback idempotent in markAlive
> ----------------------------------------------
>
> Key: CASSANDRA-9156
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9156
> Project: Cassandra
> Issue Type: Improvement
> Components: Distributed Metadata
> Reporter: Stefania
> Assignee: Stefania
> Priority: Minor
> Fix For: 3.x
>
>
> As discussed in CASSANDRA-7816, in Gossiper.markAlive we send an echo before
> calling realMarkAlive. However sometimes we send multiple echos before we get
> an answer and as a consequence realMarkAlive could be called multiple times.
> We should make the echo callback idempotent, i.e., we should make
> EndpointState#isAlive an AtomicBoolean, and use CAS in
> EndpointState#markAlive and EndpointState #markDead, returning the CAS result
> (that is, if it was actually dead and turned alive, and vice-versa): this
> could be used by the Gossiper to conditionally execute realMarkAlive.
> This would avoid executing realMarkAlive multiple times.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)