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


Reply via email to