[
https://issues.apache.org/jira/browse/GEODE-7678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094894#comment-17094894
]
ASF GitHub Bot commented on GEODE-7678:
---------------------------------------
gesterzhou commented on a change in pull request #4987:
URL: https://github.com/apache/geode/pull/4987#discussion_r416954212
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
##########
@@ -10373,4 +10377,27 @@ void updatePartitionRegionConfig(
public SenderIdMonitor getSenderIdMonitor() {
return senderIdMonitor;
}
+
+ protected ClearPartitionedRegion getClearPartitionedRegion() {
+ return clearPartitionedRegion;
+ }
+
+ @Override
+ void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean
useRVV) {
+ // Synchronized to avoid other threads invoking clear on this vm/node.
+ synchronized (clearLock) {
+ clearPartitionedRegion.doClear(regionEvent, cacheWrite, this);
Review comment:
I wonder before calling doClear(), we need to call: final TXStateProxy
tx = cache.getTXMgr().pauseTransaction();
Since we will get rvvLock for all buckets before clear, there's no
guaranteed sequence for getting rvvlock for buckets, if some on-going tx
requested some rvvLock on some buckets (such as bucket1) and is requesting
rvvLock on bucket2. If clear thread did not pause the transaction, there could
be deadlock.
----------------------------------------------------------------
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]
> Partitioned Region clear operations must invoke cache level listeners
> ---------------------------------------------------------------------
>
> Key: GEODE-7678
> URL: https://issues.apache.org/jira/browse/GEODE-7678
> Project: Geode
> Issue Type: Sub-task
> Components: regions
> Reporter: Nabarun Nag
> Priority: Major
> Labels: GeodeCommons
>
> Clear operations are successful and CacheListener.afterRegionClear(),
> CacheWriter.beforeRegionClear() are invoked.
>
> Acceptance :
> * DUnit tests validating the above behavior.
> * Test coverage to when a member departs in this scenario
> * Test coverage to when a member restarts in this scenario
> * Unit tests with complete code coverage for the newly written code.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)