From 5ecb07bbc40bcc44226b828b58801ccc8ce7ae0b Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 30 Aug 2017 11:27:17 +0800 Subject: [PATCH] Revert "gossip: Make bootstrap more robust" This reverts commit b56ba023357d7a39942544518f412ca7cc41b915. After commit 8fa35d6ddf (messaging_service: Get rid of timeout and retry logic for streaming verb), streaming verb in rpc does not check if a node is in gossip memebership since all the retry logic is removed. Remove the extra wait before removing the joining node from gossip membership. Message-Id: (cherry picked from commit cc18da5640354da1976c65b61ec77666e4993828) --- gms/gossiper.cc | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/gms/gossiper.cc b/gms/gossiper.cc index 0e30565860..cbf22aa0e7 100644 --- a/gms/gossiper.cc +++ b/gms/gossiper.cc @@ -515,26 +515,12 @@ void gossiper::do_status_check() { // check if this is a fat client. fat clients are removed automatically from // gossip after FatClientTimeout. Do not remove dead states here. - if (is_gossip_only_member(endpoint) && !_just_removed_endpoints.count(endpoint)) { - auto diff = now - ep_state.get_update_timestamp(); - auto timeout = fat_client_timeout; - auto status = get_gossip_status(ep_state); - if (status == sstring(versioned_value::STATUS_BOOTSTRAPPING)) { - // The bootstrapping node will be a gossip only member, until - // the streaming finishes and the node becomes NORMAL state. - // If during this time, the bootstrapping node is overwhelmed - // with streaming, it is possible the node will delay the - // update the gossip heartbeat. Be forgiving for the - // bootstrapping node and do not remove it from gossip too - // fast. Otherwise, streaming rpc verbs will not be resent - // becasue the node is not in gossip membership anymore. - timeout = 10 * fat_client_timeout; - } - if (diff > timeout) { - logger.info("FatClient {} has been silent for {}ms, removing from gossip, status = {}", endpoint, timeout.count(), status); - remove_endpoint(endpoint); // will put it in _just_removed_endpoints to respect quarantine delay - evict_from_membership(endpoint); // can get rid of the state immediately - } + if (is_gossip_only_member(endpoint) + && !_just_removed_endpoints.count(endpoint) + && ((now - ep_state.get_update_timestamp()) > fat_client_timeout)) { + logger.info("FatClient {} has been silent for {}ms, removing from gossip", endpoint, fat_client_timeout.count()); + remove_endpoint(endpoint); // will put it in _just_removed_endpoints to respect quarantine delay + evict_from_membership(endpoint); // can get rid of the state immediately } // check for dead state removal