This commit is contained in:
Elliott 2026-07-29 13:35:33 +08:00 committed by GitHub
commit 48e540953c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,7 @@ public abstract class AbstractCommitLogService
if (markerIntervalNanos <= 0)
{
haveWork.acquire(1);
haveWork.drain();
}
else
{
@ -213,6 +214,7 @@ public abstract class AbstractCommitLogService
long wakeUpAt = pollStarted + markerIntervalNanos;
if (wakeUpAt > now)
haveWork.tryAcquireUntil(1, wakeUpAt);
haveWork.drain();
}
}
catch (Throwable t)
@ -221,6 +223,7 @@ public abstract class AbstractCommitLogService
throw new TerminateException();
else // sleep for full poll-interval after an error, so we don't spam the log file
haveWork.tryAcquire(1, markerIntervalNanos, NANOSECONDS);
haveWork.drain();
}
}