From f7be7c9ceea5589403be06f24547fc6b04b51cc0 Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 5 Aug 2015 11:27:45 +0800 Subject: [PATCH] storage_service: Wire up update_tokens in handle_state_normal --- service/storage_service.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index b1c89d3fa8..0182bcb986 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -489,7 +489,13 @@ void storage_service::handle_state_normal(inet_address endpoint) { // Gossiper.instance.replacementQuarantine(ep); // quarantine locally longer than normally; see CASSANDRA-8260 // } if (!tokens_to_update_in_system_keyspace.empty()) { - // SystemKeyspace.updateTokens(endpoint, tokens_to_update_in_system_keyspace); + db::system_keyspace::update_tokens(endpoint, tokens_to_update_in_system_keyspace).then_wrapped([endpoint] (auto&& f) { + try { + f.get(); + } catch (...) { + logger.error("fail to update tokens for {}: {}", endpoint, std::current_exception()); + } + }); } if (!local_tokens_to_remove.empty()) { // SystemKeyspace.updateLocalTokens(Collections.emptyList(), local_tokens_to_remove);