Only log running out of slots when out of slots (#19637)

We were logging on every `refresh=wait_for`.
This commit is contained in:
Nik Everett 2016-07-27 18:26:09 -04:00 committed by GitHub
parent 9d87314105
commit 56ee49255b
1 changed files with 3 additions and 1 deletions

View File

@ -207,7 +207,9 @@ public abstract class TransportWriteAction<
if (location != null) {
pendingOps = true;
indexShard.addRefreshListener(location, forcedRefresh -> {
logger.warn("block_until_refresh request ran out of slots and forced a refresh: [{}]", request);
if (forcedRefresh) {
logger.warn("block_until_refresh request ran out of slots and forced a refresh: [{}]", request);
}
respond.respondAfterAsyncAction(forcedRefresh);
});
}