Handle empty CFs in Memtable#maybeUpdateLiveRatio()

patch by Christian Spriegel; reviewed by Aleksey Yeschenko for
CASSANDRA-7401
This commit is contained in:
Aleksey Yeschenko 2014-06-17 17:59:26 -07:00
parent 7801aab8c0
commit 9afc2097ef
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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))
{