Repository: cassandra Updated Branches: refs/heads/trunk 704469d95 -> 75b9ea41e
Handle empty CFs in Memtable#maybeUpdateLiveRatio() patch by Christian Spriegel; reviewed by Aleksey Yeschenko for CASSANDRA-7401 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9afc2097 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9afc2097 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9afc2097 Branch: refs/heads/trunk Commit: 9afc2097ef8e806b9916e623815202b0f43d1cfc Parents: 7801aab Author: Aleksey Yeschenko <alek...@apache.org> Authored: Tue Jun 17 17:59:26 2014 -0700 Committer: Aleksey Yeschenko <alek...@apache.org> Committed: Tue Jun 17 17:59:26 2014 -0700 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/Memtable.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9afc2097/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 6a50186..8af4b3e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.9 + * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401) * Fix native protocol CAS batches (CASSANDRA-7337) * Add per-CF range read request latency metrics (CASSANDRA-7338) * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323) http://git-wip-us.apache.org/repos/asf/cassandra/blob/9afc2097/src/java/org/apache/cassandra/db/Memtable.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index ea79e9c..bcef0ec 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -180,7 +180,7 @@ public class Memtable { long last = liveRatioComputedAt.get(); long operations = currentOperations.get(); - if (operations < 2 * last) + if (operations <= 2L * last) break; if (liveRatioComputedAt.compareAndSet(last, operations)) {