geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmil...@apache.org
Subject [24/25] geode git commit: GEODE-2240: fix unsafe concurrent access of ArrayList When adding to the expiredTombstones ArrayList the code now holds a sync on getBlockGCLock.
Date Fri, 23 Dec 2016 21:10:17 GMT
GEODE-2240: fix unsafe concurrent access of ArrayList
When adding to the expiredTombstones ArrayList the code
now holds a sync on getBlockGCLock.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/7fe38234
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/7fe38234
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/7fe38234

Branch: refs/heads/feature/GEODE-2231
Commit: 7fe382342c17f938c67da29472218ecda41d410e
Parents: 577bda1
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Wed Dec 21 13:48:32 2016 -0800
Committer: Karen Miller <kmiller@pivotal.io>
Committed: Fri Dec 23 13:09:28 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/geode/internal/cache/TombstoneService.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/7fe38234/geode-core/src/main/java/org/apache/geode/internal/cache/TombstoneService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TombstoneService.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/TombstoneService.java
index 2840134..7032775 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TombstoneService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TombstoneService.java
@@ -669,7 +669,9 @@ public class TombstoneService {
       if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
         logger.trace(LogMarker.TOMBSTONE, "adding expired tombstone {} to batch", tombstone);
       }
-      expiredTombstones.add(tombstone);
+      synchronized (getBlockGCLock()) {
+        expiredTombstones.add(tombstone);
+      }
     }
 
     @Override


Mime
View raw message