Github user upthewaterspout commented on a diff in the pull request:

    https://github.com/apache/geode/pull/570#discussion_r122085382
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
 ---
    @@ -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 --
    
    This seems similar to the logic a few lines down where we say "if 
(!forceRemovePrimary && bucketAdvisor.isPrimary()) {..."
    
    Unlike that line, your new logic doesn't honor the forceRemovePrimary flag. 
Should it? I don't actually see any cases where that is passed in as true, so 
maybe we should just remove that flag?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to