tkalkirill commented on code in PR #800:
URL: https://github.com/apache/ignite-3/pull/800#discussion_r870186658
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointProgress.java:
##########
@@ -17,16 +17,52 @@
package org.apache.ignite.internal.pagememory.persistence.checkpoint;
-
+import java.util.UUID;
import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.jetbrains.annotations.Nullable;
/**
* Represents information of progress of a current checkpoint and allows
obtaining future to wait for a particular checkpoint state.
*/
-// TODO: IGNITE-16898 Continue porting the code
public interface CheckpointProgress {
+ /**
+ * Returns checkpoint ID.
+ */
+ UUID id();
+
+ /**
+ * Returns description of the reason of the current checkpoint.
+ */
+ @Nullable String reason();
+
+ /**
+ * Return {@code true} If checkpoint already started but have not finished
yet.
+ */
+ boolean inProgress();
+
/**
* Returns future which can be used for detection when current checkpoint
reaches the specific state.
*/
CompletableFuture<?> futureFor(CheckpointState state);
+
+ /**
+ * Returns number of dirty pages in current checkpoint. If checkpoint is
not running, returns {@code 0}.
+ */
+ int currentCheckpointPagesCount();
+
+ /**
+ * Returns counter for written checkpoint pages. Not {@code null} only if
checkpoint is running.
+ */
+ @Nullable AtomicInteger writtenPagesCounter();
Review Comment:
Result of porting, `AtomicInteger` are not needed, fix it.
--
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]