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



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/DestroyRegionOperation.java
##########
@@ -170,11 +174,15 @@ public void run() {
               // following block is specific to buckets...
               // need to wait for queued bucket profiles to be processed
               // or this destroy may do nothing and result in a stale profile
-              boolean waitForBucketInitializationToComplete = true;
               CacheDistributionAdvisee advisee = null;
               try {
-                advisee = 
PartitionedRegionHelper.getProxyBucketRegion(dm.getCache(), regionPath,
-                    waitForBucketInitializationToComplete);
+                if (op.isRegionDestroy() && !op.isClose() && op.isLocal()) {
+                  advisee = 
PartitionedRegionHelper.getProxyBucketRegion(dm.getCache(), regionPath,

Review comment:
       Skip waiting for `RegionAdvisor.preInitQueue`. Because only 
`BucketProfileUpdateMessage` and `AllBucketProfilesUpdateMessage` are actually 
adding bucket profiles to the queue. And the recipients of these two kinds of 
messages are based on the `DistributionAdvisor`. The advisor doesn't return a 
member that is still in the process of creating a partitioned region. 
Therefore, `BucketProfileUpdateMessage` and `AllBucketProfilesUpdateMessage` 
don't add bucket profiles to the `preInitQueue` for a member that is still in 
the process of creating a partitioned region. It is not necessary to wait on 
the queue on such member. 




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

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


Reply via email to