[Discovery] Add try/catch around repetitive onSuccess calls

This commit is contained in:
Boaz Leskes 2014-08-29 17:03:08 +02:00
parent d15909716b
commit 680fb36637
1 changed files with 5 additions and 1 deletions

View File

@ -884,7 +884,11 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
@Override
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
for (Tuple<DiscoveryNode, MembershipAction.JoinCallback> drainedTask : drainedTasks) {
drainedTask.v2().onSuccess();
try {
drainedTask.v2().onSuccess();
} catch (Exception e) {
logger.error("unexpected error during [{}]", e, source);
}
}
}
});