Reduce shard started failure logging (#43330)

If the master is stepping or shutting down, the error-level logging can cause quite a bit of noise.
This commit is contained in:
Yannick Welsch 2019-06-20 13:22:42 +02:00
parent 7f8e1454ab
commit a76c034866
1 changed files with 5 additions and 1 deletions

View File

@ -589,9 +589,13 @@ public class ShardStateAction {
@Override @Override
public void onFailure(String source, Exception e) { public void onFailure(String source, Exception e) {
if (e instanceof FailedToCommitClusterStateException || e instanceof NotMasterException) {
logger.debug(() -> new ParameterizedMessage("failure during [{}]", source), e);
} else {
logger.error(() -> new ParameterizedMessage("unexpected failure during [{}]", source), e); logger.error(() -> new ParameterizedMessage("unexpected failure during [{}]", source), e);
} }
} }
}
public static class StartedShardEntry extends TransportRequest { public static class StartedShardEntry extends TransportRequest {
final ShardId shardId; final ShardId shardId;