[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,9 +151,11 @@ public class RoutingService extends AbstractLifecycleComponent<RoutingService> i
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String source, Throwable t) {
|
public void onFailure(String source, Throwable t) {
|
||||||
|
if (!(t instanceof ClusterService.NoLongerMasterException)) {
|
||||||
ClusterState state = clusterService.state();
|
ClusterState state = clusterService.state();
|
||||||
logger.error("unexpected failure during [{}], current state:\n{}", t, source, state.prettyPrint());
|
logger.error("unexpected failure during [{}], current state:\n{}", t, source, state.prettyPrint());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
routingTableDirty = false;
|
routingTableDirty = false;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue