dant3 commented on code in PR #7250:
URL: https://github.com/apache/ignite-3/pull/7250#discussion_r2652513214
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointReadWriteLock.java:
##########
@@ -196,20 +196,20 @@ private void onReadLock(long startNanos, boolean taken) {
metrics.decrementReadLockWaitingThreads();
long currentNanos = System.nanoTime();
- long elapsedNanos = TimeUnit.NANOSECONDS.toMillis(currentNanos -
startNanos);
+ long elapsedNanos = currentNanos - startNanos;
if (taken) {
int newLockCount = checkpointReadLockHoldCount.get() + 1;
checkpointReadLockHoldCount.set(newLockCount);
- // We only record acquisition time on first lock acquisition (not
on reentrant locks).
+ // We only record acquisition time on first lock acquisition (not
on reentry).
if (newLockCount == 1) {
checkpointReadLockAcquiredTime.set(currentNanos);
}
metrics.recordReadLockAcquisitionTime(elapsedNanos);
}
- if (elapsedNanos > LONG_LOCK_THRESHOLD_MILLIS) {
+ if (elapsedNanos > LONG_LOCK_THRESHOLD_NANOS) {
log.warn(LONG_LOCK_THROTTLE_KEY, "Checkpoint read lock took {} ms
to acquire.", elapsedNanos);
Review Comment:
gotcha, I forgot to edit the message 😅
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]