geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gesterzhou <>
Subject [GitHub] geode pull request #570: GEODE-3055: waitUntilFlush should use data region's...
Date Tue, 01 Aug 2017 21:10:53 GMT
Github user gesterzhou commented on a diff in the pull request:
    --- Diff: geode-core/src/main/java/org/apache/geode/internal/cache/
    @@ -1472,6 +1472,19 @@ public boolean removeBucket(int bucketId, boolean forceRemovePrimary)
           BucketAdvisor bucketAdvisor = bucketRegion.getBucketAdvisor();
    +      InternalDistributedMember primary = bucketAdvisor.getPrimary();
    +      InternalDistributedMember myId =
    +          this.partitionedRegion.getDistributionManager().getDistributionManagerId();
    +      if (primary == null || myId.equals(primary)) {
    --- End diff --
    The forceRemovePrimary WAS useless and it can be removed because it always use "false".
    But when I added the logic to remove the leader region bucket (when the shadow bucket
failed to initialize), then I have to call the removeBucket(xxx, true) by myself. 
    The shadow bucket was removed first by the exception handling. But I added the logic to
remove leader bucket, I have to skip a few "return false" exit points, because at this time
the leader bucket is not logically ready and not qualified to be removed unless I force to
remove it. 
    So I make use of the forceRemovePrimary parameter. Maybe I should change it to better
name, such as forceToRemove.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message