[ 
https://issues.apache.org/jira/browse/GEODE-7845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206397#comment-17206397
 ] 

ASF GitHub Bot commented on GEODE-7845:
---------------------------------------

jinmeiliao commented on a change in pull request #5577:
URL: https://github.com/apache/geode/pull/5577#discussion_r498981996



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
##########
@@ -5328,6 +5328,22 @@ public int getTotalNumberOfBuckets() {
     return this.totalNumberOfBuckets;
   }
 
+  /**
+   * This method returns a boolean to indicate if all server versions support 
Partition Region clear
+   */
+  public boolean allServerVersionsSupportPartitionRegionClear() {
+    for (int i = 0; i < getTotalNumberOfBuckets(); i++) {

Review comment:
       I am not very familiar with how PR is implemented, but is 
`getTotalNumberOfBuckets` returns the bucket counts for this server only or for 
the entire region?

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
##########
@@ -362,6 +367,10 @@ void doClear(RegionEventImpl regionEvent, boolean 
cacheWrite) {
       try {
         Set<Integer> bucketsCleared = clearRegion(regionEvent);
 
+        if (!partitionedRegion.allServerVersionsSupportPartitionRegionClear()) 
{

Review comment:
       why are we doing the check here again? I though we only need to check it 
before we send out the message.




----------------------------------------------------------------
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:
us...@infra.apache.org


> Rollingupgrade should not conflict with the new ClearPRMessage 
> ---------------------------------------------------------------
>
>                 Key: GEODE-7845
>                 URL: https://issues.apache.org/jira/browse/GEODE-7845
>             Project: Geode
>          Issue Type: Improvement
>          Components: core
>            Reporter: Xiaojian Zhou
>            Assignee: Mark Hanson
>            Priority: Major
>              Labels: GeodeCommons, pull-request-available
>
> PartitionedRegion clear introduced a new ClearPRMessage. In case of doing 
> rolling upgrade, the user called PR.clear. The new ClearPRMessage should not 
> fail. It should not be sent to the old members. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to