cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/8] git commit: Fix race in FileCacheService RemovalListener patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7278
Date Fri, 27 Jun 2014 02:37:10 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 900f29c7f -> 2b973b9ed
  refs/heads/cassandra-2.1 c18e740c8 -> 8aa2b791d
  refs/heads/trunk 652a7ea71 -> beea5d68c


Fix race in FileCacheService RemovalListener
patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7278


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/900f29c7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/900f29c7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/900f29c7

Branch: refs/heads/trunk
Commit: 900f29c7f7e1d563c4b0c63eae0da8877766813f
Parents: ac1d5bd
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Jun 26 19:16:12 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Jun 26 19:17:58 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                 | 4 ++++
 src/java/org/apache/cassandra/service/FileCacheService.java | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/900f29c7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2b3ace3..c74b27d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.10
+ * Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+
+
 2.0.9
  * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
  * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/900f29c7/src/java/org/apache/cassandra/service/FileCacheService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/FileCacheService.java b/src/java/org/apache/cassandra/service/FileCacheService.java
index faa53f0..59b5548 100644
--- a/src/java/org/apache/cassandra/service/FileCacheService.java
+++ b/src/java/org/apache/cassandra/service/FileCacheService.java
@@ -69,7 +69,7 @@ public class FileCacheService
                 if (cachedInstances.size() > 0)
                     logger.debug("Evicting cold readers for {}", cachedInstances.peek().getPath());
 
-                for (RandomAccessReader reader : cachedInstances)
+                for (RandomAccessReader reader = cachedInstances.poll(); reader != null;
reader = cachedInstances.poll())
                 {
                     memoryUsage.addAndGet(-1 * reader.getTotalBufferSize());
                     reader.deallocate();


Mime
View raw message