ivanzlenko commented on code in PR #5935:
URL: https://github.com/apache/ignite-3/pull/5935#discussion_r2115766265


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointReadWriteLock.java:
##########
@@ -45,8 +55,9 @@ public class CheckpointReadWriteLock {
      *
      * @param checkpointLock Checkpoint lock.
      */
-    public CheckpointReadWriteLock(ReentrantReadWriteLockWithTracking 
checkpointLock) {
+    public CheckpointReadWriteLock(ReentrantReadWriteLockWithTracking 
checkpointLock, Executor throttledLogExecutor) {

Review Comment:
   javadoc missing for parameter



##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointReadWriteLock.java:
##########
@@ -158,4 +171,16 @@ public boolean isWriteLockHeldByCurrentThread() {
     public int getReadHoldCount() {
         return checkpointLock.getReadHoldCount();
     }
+
+    private void onReadLock(long start, boolean taken) {
+        long elapsed = coarseCurrentTimeMillis() - start;
+
+        if (taken) {
+            checkpointReadLockHoldCount.set(checkpointReadLockHoldCount.get() 
+ 1);
+        }
+
+        if (elapsed > LONG_LOCK_THRESHOLD_MILLIS) {
+            log.warn("long-lock", "Checkpoint read lock took {} ms to 
acquire.", elapsed);

Review Comment:
   Can it be made as a constant with good visibility?



##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointReadWriteLock.java:
##########
@@ -17,21 +17,31 @@
 
 package org.apache.ignite.internal.pagememory.persistence.checkpoint;
 
+import static 
org.apache.ignite.internal.util.FastTimestamps.coarseCurrentTimeMillis;
+
+import java.util.concurrent.Executor;
 import java.util.concurrent.TimeUnit;
 import org.apache.ignite.internal.lang.IgniteInternalException;
+import org.apache.ignite.internal.logger.IgniteThrottledLogger;
+import org.apache.ignite.internal.logger.Loggers;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * Wrapper of the classic read write lock with checkpoint features.
  */
 public class CheckpointReadWriteLock {
+

Review Comment:
   Unnecessary change



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to