nabarunnag commented on a change in pull request #6373:
URL: https://github.com/apache/geode/pull/6373#discussion_r620555615



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
##########
@@ -567,19 +567,13 @@ public boolean virtualPut(EntryEventImpl event, boolean 
ifNew, boolean ifOld,
    */
   @Override
   public void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, 
boolean useRVV) {
-    if (!getBucketAdvisor().isPrimary()) {
-      if (logger.isDebugEnabled()) {
-        logger.debug("Not primary bucket when doing clear, do nothing");
-      }
-      return;
-    }
-
     // get rvvLock
     Set<InternalDistributedMember> participants =
         getCacheDistributionAdvisor().adviseInvalidateRegion();
     boolean isLockedAlready = 
this.partitionedRegion.getPartitionedRegionClear()
         .isLockedForListenerAndClientNotification();
 
+    boolean lockedForPrimary = doLockForPrimary(false);

Review comment:
       I was just wondering how will this work if while excuting this command, 
the bucket is no more primary. How will this method behave in this case?




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to