Skip to content

Commit

Permalink
[ML-DataFrame] reduce log spam: do not trigger indexer if state is in…
Browse files Browse the repository at this point in the history
…dexing or stopping (#42849)

reduce log spam: do not trigger indexer if state is indexing or stopping
  • Loading branch information
Hendrik Muhs authored and mayya-sharipova committed Jun 7, 2019
1 parent baf90ba commit 4383704
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,13 @@ public synchronized boolean maybeTriggerAsyncJob(long now) {
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);
}

Expand Down

0 comments on commit 4383704

Please sign in to comment.