You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ines Potier (Jira)" <ji...@apache.org> on 2025/05/27 04:01:00 UTC
[jira] [Created] (CASSANDRA-20683) Cleanup does not propagate commit log intervals
Ines Potier created CASSANDRA-20683:
---------------------------------------
Summary: Cleanup does not propagate commit log intervals
Key: CASSANDRA-20683
URL: https://issues.apache.org/jira/browse/CASSANDRA-20683
Project: Apache Cassandra
Issue Type: Bug
Reporter: Ines Potier
Unlike compactions, the cleanup operation targets each SSTable separately: [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java#L821-L825]. For SSTables that have outdated data, it rewrites them, eliminating any unowned rows from the original SSTable.
The cleanup code currently does not seem to propagate the replay statistics from the old SSTable to the writer, because of how the writer is constructed: [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java#L1790]
Upon the next startup, the commit log replay could begin replaying data that has already been flushed to SSTables. If gc_grace has expired and some commit log segments containing tombstones have already been discarded, this might result in data resurrection.
See unit test here: [https://github.com/inespot/cassandra/commit/2ef79c53fcf631858f104a460bdf4f7777ee2a17] for a repro.
If you agree this is a bug, and not an intentional piece of the implementation, happy to contribute a potential fix to the MetadataCollector construction code within the SSTable writer.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org