rpuch commented on code in PR #6799:
URL: https://github.com/apache/ignite-3/pull/6799#discussion_r2525922378


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/compaction/Compactor.java:
##########
@@ -485,4 +474,38 @@ private DeltaFileForCompaction(
             this.deltaFilePageStoreIo = deltaFilePageStoreIo;
         }
     }
+
+    /**
+     * Pauses the compactor until it is resumed or compactor is stopped. It is 
expected that this method will not be called multiple times
+     * in parallel and subsequent calls will strictly be calls after {@link 
#resume}.
+     */
+    public void pause() {
+        synchronized (mux) {
+            assert !paused : "It is expected that a further pause will only 
occur after resume";
+
+            paused = true;
+        }
+    }
+
+    /** Resumes the compactor if it was paused. It is expected that this 
method will not be called multiple times in parallel. */
+    public void resume() {
+        synchronized (mux) {
+            paused = false;
+
+            addedDeltaFiles = true;

Review Comment:
   Why is this assignment needed? Please elaborate in a comment



-- 
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]

Reply via email to