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


##########
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:
   It's funny, but it's the other way around: the original position (in the 
middle of the construct) means that the reference to array can be null itself, 
but if you put the annotation before the construct, it means that array 
elements are nullable. See https://stackoverflow.com/a/50277992/7637120 and 
note that `@Nullable` is meta-annotated with `@Target(ElementType.TYPE_USE)`



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