kirklund commented on a change in pull request #6386:
URL: https://github.com/apache/geode/pull/6386#discussion_r624025758
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
##########
@@ -577,22 +578,38 @@ public void cmnClearRegion(RegionEventImpl regionEvent,
boolean cacheWrite, bool
// get rvvLock
Set<InternalDistributedMember> participants =
getCacheDistributionAdvisor().adviseInvalidateRegion();
- boolean isLockedAlready =
this.partitionedRegion.getPartitionedRegionClear()
- .isLockedForListenerAndClientNotification();
try {
- obtainWriteLocksForClear(regionEvent, participants, isLockedAlready);
+ obtainWriteLocksForClear(regionEvent, participants);
// no need to dominate my own rvv.
// Clear is on going here, there won't be GII for this member
clearRegionLocally(regionEvent, cacheWrite, null);
distributeClearOperation(regionEvent, null, participants);
// TODO: call reindexUserDataRegion if there're lucene indexes
} finally {
- releaseWriteLocksForClear(regionEvent, participants, isLockedAlready);
+ releaseWriteLocksForClear(regionEvent, participants);
}
}
+ @Override
+ protected void obtainWriteLocksForClear(RegionEventImpl regionEvent,
+ Set<InternalDistributedMember> participants) {
+ lockAndFlushClearToOthers(regionEvent, participants);
+ }
+
+ @Override
+ protected void releaseWriteLocksForClear(RegionEventImpl regionEvent,
+ Set<InternalDistributedMember> participants) {
+ distributedClearOperationReleaseLocks(regionEvent, participants);
+ }
+
+ @VisibleForTesting
+ void distributedClearOperationReleaseLocks(RegionEventImpl regionEvent,
Review comment:
I'm trying to clean up code on feature/GEODE-7665 and write unit tests
where we have none yet. The team wants to review code in PR form before merging
to the feature branch which unfortunately pulls in CODEOWNERS and requires CO
approvals. This feature branch is still wip and is not going to develop.
--
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]