You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/03/15 20:18:07 UTC

[GitHub] [geode] jchen21 commented on a change in pull request #7440: GEODE-10039: Fix the issue that BucketProfile can be stale in rare cases.

jchen21 commented on a change in pull request #7440:
URL: https://github.com/apache/geode/pull/7440#discussion_r827375306



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
##########
@@ -180,19 +180,23 @@ public void processProfilesQueuedDuringInitialization() {
               logger.trace(LogMarker.DISTRIBUTION_ADVISOR_VERBOSE,
                   "applying queued profile removal for all buckets for {}", qbp.memberId);
             }
-            for (int i = 0; i < buckets.length; i++) {
-              BucketAdvisor ba = buckets[i].getBucketAdvisor();
-              int serial = qbp.serials[i];
-              if (serial != ILLEGAL_SERIAL) {
-                ba.removeIdWithSerial(qbp.memberId, serial, qbp.destroyed);
-              }
-            } // for
+            if (qbp.serials.length == 1) {

Review comment:
       Looking at the code again, when `serials.length == 1`, the `bucketId` might not necessarily be `0`. Therefore, we still need the `if` and `else`.




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

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