Skip to content

Commit 81c9773

Browse files
committed
Fix invalid clock comparison
1 parent 7029e8a commit 81c9773

3 files changed

Lines changed: 1 addition & 53 deletions

File tree

.github/workflows/deepbi-integration-test.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/deepbi-release.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ boolean useLatestSnapshotIfWithinDelay()
557557
void forceOrWaitOngoingDatabasePoll()
558558
{
559559
long checkStartTime = System.currentTimeMillis();
560+
long checkStartTimeNanos = System.nanoTime();
560561
ReentrantReadWriteLock.WriteLock lock = startStopPollLock.writeLock();
561562
lock.lock();
562563
try {
@@ -569,7 +570,6 @@ void forceOrWaitOngoingDatabasePoll()
569570
}
570571
// Verify if there was a on-demand poll completed while we were waiting for the lock
571572
if (latestDatabasePoll instanceof OnDemandDatabasePoll) {
572-
long checkStartTimeNanos = TimeUnit.MILLISECONDS.toNanos(checkStartTime);
573573
OnDemandDatabasePoll latestOnDemandPoll = (OnDemandDatabasePoll) latestDatabasePoll;
574574
if (latestOnDemandPoll.initiationTimeNanos > checkStartTimeNanos) {
575575
return;

0 commit comments

Comments
 (0)