This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch cassandra-6.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit d8041401557cd8e2a1ee328bda0841bd43e4484b
Merge: 7dcc43d460 0701c98edc
Author: Caleb Rackliffe <[email protected]>
AuthorDate: Tue Nov 3 16:01:14 2026 -0600

    Merge branch 'cassandra-5.0' into cassandra-6.0
    
    * cassandra-5.0:
      Delete SSTable components oldest-first so a partially deleted SSTable's 
transaction log is not reported as corrupt

 CHANGES.txt                                        |   1 +
 .../io/sstable/format/AbstractSSTableFormat.java   |  51 +++++++
 .../io/sstable/format/SortedTableScrubber.java     |  21 ---
 .../cassandra/io/sstable/format/big/BigFormat.java |  34 +----
 .../cassandra/io/sstable/format/bti/BtiFormat.java |  30 +---
 .../cassandra/db/lifecycle/LogTransactionTest.java | 169 ++++++++++++++++++++-
 6 files changed, 222 insertions(+), 84 deletions(-)

diff --cc CHANGES.txt
index 9f01e569a5,aa5c5c7d37..107488d0ab
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -91,7 -25,9 +91,8 @@@ Merged from 5.0
  Merged from 4.1:
   * PreV5Handlers.toFlushItem may leak memory on disconnected channel 
(CASSANDRA-21766)
  Merged from 4.0:
+  * Delete SSTable files in order of last-updated timestamp (CASSANDRA-21649)
   * Prevent negative BufferPool overflow memory accounting (CASSANDRA-21815)
 - * Respect cassandra.skip_sync in LogReplica, SSTable.appendTOC and 
ChecksumWriter (CASSANDRA-21835)
   * Fix cassandra-env.sh treating Xmx/Xms/Xmn inside paths as heap flags 
(CASSANDRA-21804)
   * IndexSummaryRedistribution should unmark compacting SSTables in batch 
(CASSANDRA-20159)
   * Fix global MemtableOffHeapDataSize metric reporting on-heap memtable usage 
(CASSANDRA-21762)
diff --cc src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
index e6b60c2a06,716b083674..bd1c8ddc7f
--- a/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
@@@ -64,102 -57,8 +58,100 @@@ import org.apache.cassandra.utils.JVMSt
  import org.apache.cassandra.utils.OutputHandler;
  import org.apache.cassandra.utils.Pair;
  
- import static 
org.apache.cassandra.io.sstable.format.SSTableFormat.Components.DATA;
- 
  /**
 - * Legacy bigtable format
 + * Legacy bigtable format. Components and approximate lifecycle:
 + * <br>
 + * {@link SSTableFormat.Components}
 + * <br>
 + * {@link Components#ALL_COMPONENTS}
 + *  <ul>
 + *     <li>
 + *       {@link Components#SUMMARY}: When searching for a PK we go here for a 
first approximation on where to look in the index file. It is
 + *       a small sampling of the Index entries intended for a first fast 
search in-memory.
 + *       <p></p>
 + *       {@link org.apache.cassandra.io.sstable.indexsummary.IndexSummary}
 + *       <br>
 + *       {@link IndexSummaryComponent}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#PRIMARY_INDEX}: We'll land here in the approximate 
area where to look for the PK thanks to the Summary. Now we'll search for
 + *       the exact PK to get it's exact position in the data file.
 + *       <p></p>
 + *       {@link BigTableWriter#indexWriter}
 + *       <br>
 + *       {@link RowIndexEntry}
 + *       <br>
 + *       {@link org.apache.cassandra.io.sstable.IndexInfo}
 + *       <br>
 + *       {@link org.apache.cassandra.io.sstable.format.IndexComponent}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#DATA}: The actual data/partitions file as an array 
or partitions. Each partition has the form:
 + *       <ul>
 + *       <li>A partition header</li>
 + *       <li>Maybe a static row</li>
 + *       <li>Rows or range tombstone</li>
 + *       </ul>
 + *       I.e. upon flush {@link Flushing.FlushRunnable#writeSortedContents}
 + *       <br>
 + *       Down to {@link 
org.apache.cassandra.io.sstable.format.SortedTableWriter#startPartition}
 + *       <br>
 + *       Down to {@link 
org.apache.cassandra.io.sstable.format.SortedTablePartitionWriter#start}
 + *       <br>
 + *       {@link org.apache.cassandra.io.sstable.format.DataComponent}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#STATS}: Stats on the data such as min timestamps 
to later vint encode TTL, markForDeleteAt, etc
 + *       <p></p>
 + *       {@link org.apache.cassandra.db.rows.EncodingStats}
 + *       <br>
 + *       {@link org.apache.cassandra.io.sstable.format.StatsComponent}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#COMPRESSION_INFO}: Contains compresion metadata
 + *       <p></p>
 + *       {@link org.apache.cassandra.io.compress.CompressedSequentialWriter}
 + *       <br>
 + *       {@link org.apache.cassandra.io.compress.CompressionMetadata}
 + *       <br>
 + *       {@link 
org.apache.cassandra.io.sstable.format.CompressionInfoComponent}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#DIGEST}: The digest supporting the compression
 + *       <p></p>
 + *       {@link org.apache.cassandra.io.compress.CompressedSequentialWriter}
 + *       <br>
 + *       {@link org.apache.cassandra.io.util.ChecksumWriter}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#FILTER}: Bloom filter for data files
 + *       <p></p>
 + *       {@link org.apache.cassandra.io.sstable.format.FilterComponent}
 + *       <br>
 + *       {@link org.apache.cassandra.utils.BloomFilterSerializer}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#CRC}: CRC for the data
 + *       <p></p>
 + *       {@link org.apache.cassandra.io.util.ChecksummedSequentialWriter}
 + *       <br>
 + *       {@link org.apache.cassandra.io.util.ChecksumWriter}
 + *       <p></p>
 + *     </li>
 + *     <li>
 + *       {@link Components#TOC}: List of all the components for the SSTable
 + *       <p></p>
 + *       {@link org.apache.cassandra.io.sstable.format.TOCComponent}
 + *     </li>
 + *   </ul>
 + *
   */
  public class BigFormat extends AbstractSSTableFormat<BigTableReader, 
BigTableWriter>
  {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to