mirror of https://github.com/apache/cassandra
Fix partition-level-delete-only workload accounting
patch by benedict; reviewed by jbellis for CASSANDRA-9194
This commit is contained in:
parent
593a7257b5
commit
f0c7a6f03c
|
|
@ -1,4 +1,5 @@
|
|||
2.0.15:
|
||||
* Fix partition-level-delete-only workload accounting (CASSANDRA-9194)
|
||||
* Allow scrub to handle corrupted compressed chunks (CASSANDRA-9140)
|
||||
* Fix assertion error when resetlocalschema is run during repair (CASSANDRA-9249)
|
||||
* Disable single sstable tombstone compactions for DTCS by default (CASSANDRA-9234)
|
||||
|
|
|
|||
|
|
@ -206,17 +206,21 @@ public class Memtable
|
|||
{
|
||||
AtomicSortedColumns previous = rows.get(key);
|
||||
|
||||
long initialSize = 0;
|
||||
if (previous == null)
|
||||
{
|
||||
AtomicSortedColumns empty = cf.cloneMeShallow(AtomicSortedColumns.factory, false);
|
||||
// We'll add the columns later. This avoids wasting works if we get beaten in the putIfAbsent
|
||||
previous = rows.putIfAbsent(new DecoratedKey(key.token, allocator.clone(key.key)), empty);
|
||||
if (previous == null)
|
||||
{
|
||||
previous = empty;
|
||||
initialSize += 1;
|
||||
}
|
||||
}
|
||||
|
||||
final Pair<Long, Long> pair = previous.addAllWithSizeDelta(cf, allocator, localCopyFunction, indexer);
|
||||
currentSize.addAndGet(pair.left);
|
||||
currentSize.addAndGet(initialSize + pair.left);
|
||||
currentOperations.addAndGet(cf.getColumnCount() + (cf.isMarkedForDelete() ? 1 : 0) + cf.deletionInfo().rangeCount());
|
||||
return pair.right;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue