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,7 +589,11 @@ public class ShardStateAction {
@Override
public void onFailure(String source, Exception e) {
logger.error(() -> new ParameterizedMessage("unexpected failure during [{}]", source), 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);
}
}
}