maedhroz commented on code in PR #1723:
URL: https://github.com/apache/cassandra/pull/1723#discussion_r984056570
##########
src/java/org/apache/cassandra/db/partitions/AtomicBTreePartition.java:
##########
@@ -112,92 +112,78 @@ protected boolean canHaveShadowedData()
return true;
}
- private long[] addAllWithSizeDeltaInternal(RowUpdater updater,
PartitionUpdate update, UpdateTransaction indexer)
- {
- Holder current = ref;
- updater.reset();
-
- if (!update.deletionInfo().getPartitionDeletion().isLive())
-
indexer.onPartitionDeletion(update.deletionInfo().getPartitionDeletion());
-
- if (update.deletionInfo().hasRanges())
-
update.deletionInfo().rangeIterator(false).forEachRemaining(indexer::onRangeTombstone);
-
- DeletionInfo deletionInfo;
- if (update.deletionInfo().mayModify(current.deletionInfo))
- {
- if (updater.inputDeletionInfoCopy == null)
- updater.inputDeletionInfoCopy =
update.deletionInfo().clone(HeapCloner.instance);
-
- deletionInfo =
current.deletionInfo.mutableCopy().add(updater.inputDeletionInfoCopy);
- updater.onAllocatedOnHeap(deletionInfo.unsharedHeapSize() -
current.deletionInfo.unsharedHeapSize());
- }
- else
- {
- deletionInfo = current.deletionInfo;
- }
-
- RegularAndStaticColumns columns =
update.columns().mergeTo(current.columns);
- updater.onAllocatedOnHeap(columns.unsharedHeapSize() -
current.columns.unsharedHeapSize());
- Row newStatic = update.staticRow();
- Row staticRow = newStatic.isEmpty()
- ? current.staticRow
- : (current.staticRow.isEmpty() ?
updater.insert(newStatic) : updater.merge(current.staticRow, newStatic));
- Object[] tree = BTree.update(current.tree, update.holder().tree,
update.metadata().comparator, updater);
- EncodingStats newStats = current.stats.mergeWith(update.stats());
- updater.onAllocatedOnHeap(newStats.unsharedHeapSize() -
current.stats.unsharedHeapSize());
-
- if (tree != null && refUpdater.compareAndSet(this, current, new
Holder(columns, tree, deletionInfo, staticRow, newStats)))
- {
- updater.finish();
- return new long[]{ updater.dataSize, updater.colUpdateTimeDelta };
- }
- else
- {
- return null;
- }
- }
/**
* Adds a given update to this in-memtable partition.
*
* @return an array containing first the difference in size seen after
merging the updates, and second the minimum
* time detla between updates.
Review Comment:
```suggestion
* time delta between updates.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]