avoid logging pause message multiple times (#11375)

In some instances the ingestion thread could be woken up spuriously,
resulting in the "Received pause command..." log message getting logged
multiple times. This change ensures we only log it once the first time
the pause is requested.
This commit is contained in:
Xavier Léauté 2021-06-22 09:30:38 -07:00 committed by GitHub
parent f0b105ec63
commit c8b3f8cc00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1279,8 +1279,8 @@ public abstract class SeekableStreamIndexTaskRunner<PartitionIdType, SequenceOff
status = Status.PAUSED; status = Status.PAUSED;
hasPaused.signalAll(); hasPaused.signalAll();
log.debug("Received pause command, pausing ingestion until resumed.");
while (pauseRequested) { while (pauseRequested) {
log.debug("Received pause command, pausing ingestion until resumed.");
shouldResume.await(); shouldResume.await();
} }