You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/03/19 18:57:41 UTC

[GitHub] [geode] pivotal-eshu commented on a change in pull request #6075: GEODE-8943: Avoid filter registration during Transaction commit

pivotal-eshu commented on a change in pull request #6075:
URL: https://github.com/apache/geode/pull/6075#discussion_r597910217



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
##########
@@ -591,13 +593,14 @@ private void lockFilterRegistrationOnTxRegions() {
     for (InternalRegion region : getRegions()) {
       if (lockableRegionForFilterRegistration(region)) {
         region.getFilterProfile().lockFilterRegistrationDuringTx();
+        filterLockAcquiredRegions.add(region);
       }
     }
   }
 
   private void unlockFilterRegistrationOnTxRegions() {
-    for (InternalRegion region : getRegions()) {
-      if (lockableRegionForFilterRegistration(region)) {
+    for (InternalRegion region : filterLockAcquiredRegions) {
+      if (region != null) {

Review comment:
       Even if region is destroyed, we still need to unlock the readLock it holds to avoid 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:
users@infra.apache.org