This is an automated email from the ASF dual-hosted git repository.
zhouxj pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-7665 by this
push:
new 1899c24 Rebase missed code changes in DistributedClearOperation
1899c24 is described below
commit 1899c24f70dd9cbbfd321afb27d29dc2c93ab419
Author: zhouxh <[email protected]>
AuthorDate: Mon Mar 7 22:58:44 2022 -0800
Rebase missed code changes in DistributedClearOperation
---
.../apache/geode/internal/cache/DistributedClearOperation.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
index 5b2e3d7..d25ea12 100644
---
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
+++
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
@@ -215,7 +215,7 @@ public class DistributedClearOperation extends
DistributedCacheOperation {
protected boolean operateOnRegion(CacheEvent event,
ClusterDistributionManager dm)
throws EntryNotFoundException {
- DistributedRegion region = (DistributedRegion) event.getRegion();
+ LocalRegion region = (LocalRegion) event.getRegion();
switch (clearOp) {
case OP_CLEAR:
region.clearRegionLocally((RegionEventImpl) event, false, rvv);
@@ -223,9 +223,11 @@ public class DistributedClearOperation extends
DistributedCacheOperation {
appliedOperation = true;
break;
case OP_LOCK_FOR_CLEAR:
- if (region.getDataPolicy().withStorage()) {
- DistributedClearOperation.regionLocked(getSender(),
region.getFullPath(), region);
- region.lockLocallyForClear(dm, getSender(), event);
+ if (region.getDataPolicy().withStorage() && region instanceof
DistributedRegion) {
+ DistributedRegion distributedRegion = (DistributedRegion) region;
+ DistributedClearOperation.regionLocked(getSender(),
region.getFullPath(),
+ distributedRegion);
+ distributedRegion.lockLocallyForClear(dm, getSender(), event);
}
appliedOperation = true;
break;