[logging] don't log an error if scheduled reroute is rejected because local node is no longer master
Since it runs in a background thread after a node is added, or submits a cluster state update when a node leaves, it may be that by the time it is executed the local node is no longer master.
This commit is contained in:
parent
e0543b3426
commit
7fa3d7081b
|
@ -151,8 +151,10 @@ public class RoutingService extends AbstractLifecycleComponent<RoutingService> i
|
|||
|
||||
@Override
|
||||
public void onFailure(String source, Throwable t) {
|
||||
ClusterState state = clusterService.state();
|
||||
logger.error("unexpected failure during [{}], current state:\n{}", t, source, state.prettyPrint());
|
||||
if (!(t instanceof ClusterService.NoLongerMasterException)) {
|
||||
ClusterState state = clusterService.state();
|
||||
logger.error("unexpected failure during [{}], current state:\n{}", t, source, state.prettyPrint());
|
||||
}
|
||||
}
|
||||
});
|
||||
routingTableDirty = false;
|
||||
|
|
Loading…
Reference in New Issue