From 4e5a2d1c81576e4a5818b307907208b3819a5c4c Mon Sep 17 00:00:00 2001 From: Dmitry Konstantinov Date: Tue, 12 Nov 2024 14:11:27 +0000 Subject: [PATCH] AbstractCommitLogService#lastSyncedAt initialized with currentTimeMillis() but later compared and updated with System.nanoTime() Patch by Dmitry Konstantinov; reviewed by TBD for CASSANDRA-20074 --- .../apache/cassandra/db/commitlog/AbstractCommitLogService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogService.java b/src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogService.java index a65ef00a11bd..8b3acdae5eea 100644 --- a/src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogService.java +++ b/src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogService.java @@ -45,7 +45,7 @@ public abstract class AbstractCommitLogService private volatile boolean shutdown = false; // all Allocations written before this time will be synced - protected volatile long lastSyncedAt = System.currentTimeMillis(); + protected volatile long lastSyncedAt = MonotonicClock.preciseTime.now(); // counts of total written, and pending, log messages private final AtomicLong written = new AtomicLong(0);