[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:
Boaz Leskes 2014-07-15 11:46:34 +02:00
parent e0543b3426
commit 7fa3d7081b
1 changed files with 4 additions and 2 deletions

View File

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