You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "tkalkirill (via GitHub)" <gi...@apache.org> on 2025/03/26 07:53:54 UTC
[PR] IGNITE-26266 Add metrics of waiting to complete page replacement on checkpoint [ignite-3]
tkalkirill opened a new pull request, #5500:
URL: https://github.com/apache/ignite-3/pull/5500
https://issues.apache.org/jira/browse/IGNITE-23266
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-26266 Add metrics of waiting to complete page replacement on checkpoint [ignite-3]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #5500:
URL: https://github.com/apache/ignite-3/pull/5500#discussion_r2013967158
##########
modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointMetricsTrackerTest.java:
##########
@@ -171,6 +171,19 @@ void testWriteLockWait() {
assertThat(tracker.writeLockWaitDuration(NANOSECONDS), greaterThanOrEqualTo(1L));
}
+ @Test
+ void testWaitPageReplacement() {
+ assertThat(tracker.waitPageReplacementDuration(NANOSECONDS), equalTo(0L));
+
+ tracker.onWaitPageReplacementStart();
+
+ waitForTimeChange();
+
+ tracker.onWaitPageReplacementEnd();
+
+ assertThat(tracker.waitPageReplacementDuration(NANOSECONDS), greaterThanOrEqualTo(1L));
Review Comment:
Test gives false positive result
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointMetricsTracker.java:
##########
@@ -337,4 +339,31 @@ public long writeLockHoldDuration(TimeUnit timeUnit) {
public long beforeWriteLockDuration(TimeUnit timeUnit) {
return timeUnit.convert(writeLockWaitDuration.startNanos() - checkpointDuration.startNanos(), NANOSECONDS);
}
+
+ /**
+ * Callback to start waiting for page replacement to complete for all pages.
+ *
+ * <p>Not thread safe.</p>
+ */
+ public void onWaitPageReplacementStart() {
+ waitPageReplacement.onStart();
+ }
+
+ /**
+ * Callback on end waiting for page replacement to complete for all pages.
+ *
+ * <p>Not thread safe.</p>
+ */
+ public void onWaitPageReplacementEnd() {
+ fsyncDuration.onEnd();
+ }
+
+ /**
+ * Returns checkpoint waiting page replacement to complete duration in the given time unit.
+ *
+ * <p>Not thread safe.</p>
+ */
+ public long waitPageReplacementDuration(TimeUnit timeUnit) {
+ return fsyncDuration.duration(timeUnit);
Review Comment:
Shouldn't it be waitPageReplacement?
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointMetricsTracker.java:
##########
@@ -337,4 +339,31 @@ public long writeLockHoldDuration(TimeUnit timeUnit) {
public long beforeWriteLockDuration(TimeUnit timeUnit) {
return timeUnit.convert(writeLockWaitDuration.startNanos() - checkpointDuration.startNanos(), NANOSECONDS);
}
+
+ /**
+ * Callback to start waiting for page replacement to complete for all pages.
+ *
+ * <p>Not thread safe.</p>
+ */
+ public void onWaitPageReplacementStart() {
+ waitPageReplacement.onStart();
+ }
+
+ /**
+ * Callback on end waiting for page replacement to complete for all pages.
+ *
+ * <p>Not thread safe.</p>
+ */
+ public void onWaitPageReplacementEnd() {
+ fsyncDuration.onEnd();
Review Comment:
Shouldn't it be waitPageReplacement?
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23266 Add metrics of waiting to complete page replacement on checkpoint [ignite-3]
Posted by "tkalkirill (via GitHub)" <gi...@apache.org>.
tkalkirill commented on code in PR #5500:
URL: https://github.com/apache/ignite-3/pull/5500#discussion_r2013994916
##########
modules/page-memory/src/test/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointMetricsTrackerTest.java:
##########
@@ -171,6 +171,19 @@ void testWriteLockWait() {
assertThat(tracker.writeLockWaitDuration(NANOSECONDS), greaterThanOrEqualTo(1L));
}
+ @Test
+ void testWaitPageReplacement() {
+ assertThat(tracker.waitPageReplacementDuration(NANOSECONDS), equalTo(0L));
+
+ tracker.onWaitPageReplacementStart();
+
+ waitForTimeChange();
+
+ tracker.onWaitPageReplacementEnd();
+
+ assertThat(tracker.waitPageReplacementDuration(NANOSECONDS), greaterThanOrEqualTo(1L));
Review Comment:
Yes, it was a coincidence, I corrected it now.
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23266 Add metrics of waiting to complete page replacement on checkpoint [ignite-3]
Posted by "tkalkirill (via GitHub)" <gi...@apache.org>.
tkalkirill merged PR #5500:
URL: https://github.com/apache/ignite-3/pull/5500
--
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-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org