[ML-DataFrame] reduce log spam: do not trigger indexer if state is indexing or stopping (#42849)

reduce log spam: do not trigger indexer if state is indexing or stopping
This commit is contained in:
Hendrik Muhs 2019-06-06 07:45:36 +02:00
parent 5cd503a1e0
commit 280a2c9401
1 changed files with 7 additions and 0 deletions

View File

@ -517,6 +517,13 @@ public class DataFrameTransformTask extends AllocatedPersistentTask implements S
return false; return false;
} }
// ignore trigger if indexer is running, prevents log spam in A2P indexer
IndexerState indexerState = getState();
if (IndexerState.INDEXING.equals(indexerState) || IndexerState.STOPPING.equals(indexerState)) {
logger.debug("Indexer for transform [{}] has state [{}], ignoring trigger", getJobId(), indexerState);
return false;
}
return super.maybeTriggerAsyncJob(now); return super.maybeTriggerAsyncJob(now);
} }