cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: Fix accounting in FileCacheService to allow re-using RAR Patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6838
Date Wed, 12 Mar 2014 04:20:04 GMT
Fix accounting in FileCacheService to allow re-using RAR
Patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6838


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

Branch: refs/heads/cassandra-2.1
Commit: 31cbdfd7ba9e7ff2ae5f99f3f0f1a7831cd88147
Parents: fc9cad9
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Mar 11 23:18:54 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Mar 11 23:18:54 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31cbdfd7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 91037d1..d8a348d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 2.0.7
  * Fix saving triggers to schema (CASSANDRA-6789)
  * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790)
+ * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838)
 
 
 2.0.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31cbdfd7/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 c939a6f..d22763b 100644
--- a/src/java/org/apache/cassandra/service/FileCacheService.java
+++ b/src/java/org/apache/cassandra/service/FileCacheService.java
@@ -91,7 +91,10 @@ public class FileCacheService
         Queue<RandomAccessReader> instances = getCacheFor(path);
         RandomAccessReader result = instances.poll();
         if (result != null)
+        {
             metrics.hits.mark();
+            memoryUsage.addAndGet(-result.getTotalBufferSize());
+        }
 
         return result;
     }


Mime
View raw message