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:
[email protected]