mirror of https://github.com/apache/cassandra
When BTreeRow.merge reconciles an update into a row whose existing deletion shadows the update's cells, it filtered the update (incoming) side of the merge with Reconciler.retain, which records the removal via PostReconciliationFunction.delete. On the memtable write path that subtracts the shadowed cells' on-heap size from the allocator's ownership even though that incoming data was never allocated to the memtable. Under overwrite/delete churn that re-applies cells already covered by a newer row/partition deletion (e.g. repair re-streaming), the allocator's "owns" counter drifts negative and the next flush trips "AssertionError: Negative released" in MemtablePool$SubPool.released via MemtableAllocator$SubAllocator.releaseAll during discard. Filter the update (incoming) side with a non-recording variant, Reconciler.removeShadowed, and keep retain() for the existing side, whose data the memtable already owns. The filtered result is identical; only the erroneous accounting notification is dropped. This mirrors the already-correct complex-column path in ColumnData.merge. patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-21469 Assisted-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| anttasks/org/apache/cassandra/anttasks | ||
| bin | ||
| burn/org/apache/cassandra | ||
| conf | ||
| data | ||
| distributed/org/apache/cassandra | ||
| long/org/apache/cassandra | ||
| memory/org/apache/cassandra/db/compaction | ||
| microbench/org/apache/cassandra/test/microbench | ||
| resources | ||
| unit/org | ||