nizhikov commented on code in PR #11633:
URL: https://github.com/apache/ignite/pull/11633#discussion_r1836049641


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java:
##########
@@ -946,29 +946,19 @@ private void onHistoryAdded(
         HistoryAffinityAssignment replaced,
         HistoryAffinityAssignment added
     ) {
-        boolean cleanupNeeded = false;
-
         if (replaced == null) {
-            cleanupNeeded = true;
-
-            if (added.requiresHistoryCleanup())
+            if (added.isFullSizeInstance())
                 nonShallowHistSize.incrementAndGet();
         }
         else {
-            if (replaced.requiresHistoryCleanup() != 
added.requiresHistoryCleanup()) {
-                if (added.requiresHistoryCleanup()) {
-                    cleanupNeeded = true;
-
+            if (replaced.isFullSizeInstance() != added.isFullSizeInstance()) {
+                if (added.isFullSizeInstance())
                     nonShallowHistSize.incrementAndGet();
-                }
                 else
                     nonShallowHistSize.decrementAndGet();

Review Comment:
   `nonShallowHistSize.addAndGet(added.isFullSizeInstance() ? 1 : -1);`



-- 
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-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to