From 5831dcba2807cb066cbc47f02e720cc948cd97a0 Mon Sep 17 00:00:00 2001 From: Asias He Date: Wed, 12 Aug 2015 15:26:31 +0800 Subject: [PATCH] gossip: Add error handling for GOSSIP_SHUTDOWN and GOSSIP_DIGEST_ACK verb --- gms/gossiper.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gms/gossiper.cc b/gms/gossiper.cc index a7e6d4af0d..7c44117b79 100644 --- a/gms/gossiper.cc +++ b/gms/gossiper.cc @@ -211,7 +211,9 @@ void gossiper::init_messaging_service_handler() { gossiper.set_last_processed_message_at(); // TODO: Implement processing of incoming SHUTDOWN message get_local_failure_detector().force_conviction(from); - }).discard_result(); + }).handle_exception([] (auto ep) { + logger.error("Fail to handle GOSSIP_SHUTDOWN: {}", ep); + }); return messaging_service::no_wait(); }); ms().register_gossip_digest_syn([] (gossip_digest_syn syn_msg) { @@ -228,7 +230,9 @@ void gossiper::init_messaging_service_handler() { /* Notify the Failure Detector */ gossiper.notify_failure_detector(remote_ep_state_map); return gossiper.apply_state_locally(remote_ep_state_map); - }).discard_result(); + }).handle_exception([] (auto ep) { + logger.error("Fail to handle GOSSIP_DIGEST_ACK: {}", ep); + }); return messaging_service::no_wait(); }); }