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


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/PersistentPageMemory.java:
##########
@@ -1029,6 +1037,28 @@ public long loadedPages() {
         return total;
     }
 
+    /**
+     * Returns the count of dirty pages across all segments.
+     */
+    public long dirtyPagesCount() {
+        Segment[] segments = this.segments;
+        if (segments == null) {
+            return 0;
+        }
+
+        long total = 0;
+
+        for (Segment seg : segments) {
+            if (seg == null) {

Review Comment:
   I guess it's not because the array can actually be null before the component 
is initialized



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