[ 
https://issues.apache.org/jira/browse/CASSANDRA-18845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765035#comment-17765035
 ] 

Stefan Miklosovic commented on CASSANDRA-18845:
-----------------------------------------------

Interesting. I am curious what causes that initial delay. What you are saying 
is that it takes a lot of time for the nodes to be up and then it appears (from 
the log you posted)  like all of them are reported more or less at the same 
time? There is an initial delay of dozes of seconds before it starts to get 
reported? If that is true then it probably makes sense to have a condition like 
that so we see at least some other nodes to be up to count it and increase 
numOkay.

However, if we have this 
{code:java}
if (currentSize == epSize && currentLive == liveSize && (epSize == liveSize || 
liveSize > 1))
{code}

Then what if we have 

{code}
currentSize = 2 , epSize = 2, currentLive = 2, liveSize = 2
{code}

That "if" would return true, so numOkay would be increased and it would count 
it as a valid round.

However, and it is a little bit hard to formulate it correctly, but is not it 
true that we are not guaranteeing that QUORUM would be satisfied here anyway? 
Because it could stay on all "twos" for all rounds and we would say that gossip 
settled while there is bunch of other nodes to be reported but they just have 
not make it and we were stuck on 2 for three rounds.



> Waiting for gossip to settle on live endpoints
> ----------------------------------------------
>
>                 Key: CASSANDRA-18845
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18845
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Cameron Zemek
>            Priority: Normal
>         Attachments: 18845-3.11.patch, 18845-4.0.patch, 18845-4.1.patch, 
> 18845-5.0.patch, image-2023-09-14-11-16-23-020.png
>
>
> This is a follow up to CASSANDRA-18543
> Although that ticket added ability to set cassandra.gossip_settle_min_wait_ms 
> this is tedious and error prone. On a node just observed a 79 second gap 
> between waiting for gossip and the first echo response to indicate a node is 
> UP.
> The problem being that do not want to start Native Transport until gossip 
> settles otherwise queries can fail consistency such as LOCAL_QUORUM as it 
> thinks the replicas are still in DOWN state.
> Instead of having to set gossip_settle_min_wait_ms I am proposing that 
> (outside single node cluster) wait for UP message from another node before 
> considering gossip as settled. Eg.
> {code:java}
>             if (currentSize == epSize && currentLive == liveSize && liveSize 
> > 1)
>             {
>                 logger.debug("Gossip looks settled.");
>                 numOkay++;
>             } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to