Commit Graph

49 Commits

Author SHA1 Message Date
Dmitry Konstantinov ae82efc013 Add LittleEndianMemoryUtil and NativeEndianMemoryUtil, switch memtable-related off-heap objects and Memory to use them and have Little Endian now.
Add BE offsets detection on Summary loading.
Add test SSTables in an old format with BE offsets in Summary component to LegacySSTableTest.

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov, Michael Semb Wever for CASSANDRA-20190
2025-04-24 11:45:26 +01:00
Roxana Neophytou ab51b79473
Add LegacySSTableTest data for past sstable formats
Also add test method testVerifyOldTupleSSTables for frozen tuples and dropping of them.

The test data also adds different versions of me format sstables from C* version 3.0.25 and 3.11.11 as they do (unfortunately) differ. Test sstable files have had their sequence generation ids changed to represent the server version used to create them, while this shouldn't be necessary it is for debug purposes when sstable formats have changed between versions.

 patch by Roxana Neophytou, Mick Semb Wever; reviewed by Dmitry Konstantinov for CASSANDRA-20485

Co-authored-by: mck <mck@apache.org>
2025-03-28 12:33:28 +01:00
Bereng 2a458ba01d Improved DeletionTime serialization 2023-07-26 10:47:22 +02:00
Branimir Lambov 957eca2fb5 Implementation of the Unified Compaction Strategy as described in CEP-26
The approach is documented in the included UnifiedCompactionStrategy.md.

Also included:
- Generalize prettyPrint to prettyPrintBinary (with 2^10 multiplier,
  e.g. MiB) and prettyPrintDecimal (with 1000 multiplier, e.g. ms)
  that cover the full range of double, and add a parseHumanReadable
  method that can read both.

- CASSANDRA-18123: Fix invalid reuse of metadata collector during flushing

- Fix invalid token range splitting with non-unit weights

- Add flushSizeOnDisk metric

- Add ability to change compaction default in YAML

patch by Alex Sorokoumov, Branimir Lambov, Dimitar Dimitrov and Stefania Alborghetti
reviewed by Alex Sorokoumov, Jaroslaw Grabowski and Maxwell Guo for CASSANDRA-18397
2023-07-19 11:22:32 +03:00
Bereng 1adbea5a06 Extend maximum expiration date
patch by Berenguer Blasi; reviewed by Andrés de la Peña for CASSANDRA-14227
2023-06-05 07:18:34 +02:00
Jacek Lewandowski f16fb6765b Implementation of the trie-indexed SSTable format (BTI) as described in CEP-25.
Documentation in the included BTIFormat.md.

patch by Branimir Lambov and Jacek Lewandowski; reviewed by Caleb Rackliffe and Maxwell Guo for CASSANDRA-18398
2023-05-29 16:59:05 +03:00
Jacek Lewandowski 24ebd24c79 More accurate skipping of sstables in read path
This patch improves the following things:
1. SSTable metadata will store a covered slice instead of min/max clusterings. The difference is that for slices there is available the type of a bound rather than just a clustering. In particular it will provide the information whether the lower and upper bound of an sstable is opened or closed.
2. SSTable metadata will store a flag whether the SSTable contains any partition level deletions or not
3. The above two changes required to introduce a new major format for SSTables - oa
4. Single partition read command makes use of the above changes. In particular an sstable can be skipped when it does not intersect with the column filter, does not have partition level deletions and does not have statics; In case there are partition level deletions, but the other conditions are satisfied, only the partition header needs to be accessed (tests attached)
5. Skipping SSTables assuming those three conditions are satisfied has been implemented also for partition range queries (tests attached). Also added minor separate statistics to record the number of accessed sstables in partition reads because now not all of them need to be accessed.
6. Artificial lower bound marker is now an object on its own and is not implemented as a special case of range tombstone bound.
7. Extended the lower bound optimization usage due the 1 and 2
8. Do not initialize iterator just to get a cached partition and associated columns index. The purpose of using lower bound optimization was to avoid opening an iterator of an sstable if possible.
9. Add key range to stats metadata

[f369595b1c] Add fields to sstable version and placeholders in stats serializer
[f5c3f772e2] Add hasKeyRange and hasLegacyMinMax
[3cde51f4e1] Add partition level deletion presence marker to sstable stats
[67b2ee2152] Extract AbstractTypeSerializer
[c77b475d6c] Refactor slices intersection checking
[ceb5af3a38] Store min and max clustering as a slice in stats metadata as and improved min/max
[d1f8973929] Implement MetadataCollectorBench
[335369da84] Apply partition level deletion presence marker optimizations to single partition read command
[2497a009b9] Lower bound optimization - add slices and isReverseOrder fields to UnfilteredRowIteratorWithLowerBound
[e32ee31177] Lower bound optimization - Replace usage of RangeTombstoneMarker as a lower bound with ArtificialBoundMarker
[e213e712c4] Lower bound optimization - improve usage of lower bound optimization
[c4f93006b1] Apply read path improvements to partition range queries
[5fa462266c] Add key range to StatsMetadata
[79a7339ed4] Use key range from stats if possible
[266ed2749b] Added new sstables for LegacySSTableTest

patch by Jacek Lewandowski; reviewed by Branimir Lambov and C. Scott Andreas for CASSANDRA-18134

Co-authored-by: Branimir Lambov <blambov>
Co-authored-by: Sylvain Lebresne <pcmanus>
Co-authored-by: Jacek Lewandowski <jacek-lewandowski>
Co-authored-by: Jakub Zytka <jakubzytka>
2023-02-21 09:41:07 +01:00
jacek-lewandowski 05fa92475c Remove accidentally committed wrong legacy sstables
patch by Jacek Lewandowski; reviewed by Andrés de la Peña and Benjamin Lerer for CASSANDRA-17482
2022-03-25 13:09:34 +00:00
jacek-lewandowski d35f36cd05 Fix misplacement of originatingHostId in stats metadata
patch by Jacek Lewandowski; reviewed by Benjamin Lerer for CASSANDRA-16619
2021-05-17 10:36:55 +02:00
Benjamin Lerer c4fab930ca Merge branch cassandra-3.11 into cassandra-4.0 2021-05-06 11:45:47 +02:00
Benjamin Lerer d6ff4c4a35 Merge branch cassandra-3.0 into cassandra-3.11 2021-05-06 11:32:47 +02:00
jacek-lewandowski d84c6e9810 Prevent loss of commit log data when moving sstables between nodes
patch by Jakub Zytka and Jacek Lewandowski; reviewed by Branimir Lambov and Benjamin Lerer for CASSANDRA-16619

Add originating host ID to sstable metadata

- md, me sstables
- add missing test cases in MetadataSerializerTest

Co-authored-by: Jakub Zytka <jakub.zytka@datastax.com>
Co-authored-by: Jacek Lewandowski <jacek.lewandowski@datastax.com>
2021-05-05 16:41:01 +02:00
Alex Petrov 056c9eff4b Merge branch 'cassandra-3.0' into cassandra-3.11 2020-06-04 20:17:31 +02:00
Alex Petrov c4064dd80e Allow recovery from the cases when CQL-created compact sense tables have bytes in EmptyType columns.
Patch by Alex Petrov; reviewed by Sylvain Lebresne for CASSANDRA-15778.
2020-06-04 20:04:27 +02:00
Cameron Zemek 31a86f891b
Fix LegacyLayout to have same behavior as 2.x when handling unknown column names
patch by Cameron Zemek; reviewed by Mick Semb Wever for CASSANDRA-15081
2019-11-15 18:53:40 +01:00
Marcus Eriksson 767a68cd00 Ensure legacy rows have primary key livenessinfo when they contain illegal cells
Patch by marcuse and Sam Tunnicliffe; reviewed by Benedict Elliott Smith for CASSANDRA-15365
2019-10-30 15:09:04 +01:00
Sam Tunnicliffe f4b6e1d51f Filter illegal legacy cells when collating rows
Alternative solution for CASSANDRA-15086, which allows the illegal cells to
be read from disk and deserialized as normal so as not to interfere with
tracking bytes read during reverse iteration of indexed partitions.

Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-15178
2019-06-27 16:21:01 +01:00
Sam Tunnicliffe daf6c85b05 Skip cells with illegal column names when reading legacy sstables
Patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for CASSANDRA-15086
2019-05-08 09:57:32 +01:00
Sam Tunnicliffe 0a7fbee43f Reading legacy tables handles tombstones for dropped collections
Patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko and
Benedict Elliott Smith for CASSANDRA-14912
2018-11-28 16:03:16 +00:00
Aleksey Yeshchenko 9eee7aa787 Fix missing rows when reading 2.1 SSTables with static columns in 3.0
patch by Aleksey Yeschenko; reviewed by Blake Eggleston for
CASSANDRA-14873
2018-11-12 19:27:31 +00:00
Blake Eggleston 6ec445282a Merge branch 'cassandra-3.11' into trunk 2018-11-06 11:20:52 -08:00
Blake Eggleston d60c78358b Sstable min/max metadata can cause data loss
Patch by Blake Eggleston; Reviewed by Sam Tunnicliffe for CASSANDRA-14861
2018-11-06 11:17:06 -08:00
Blake Eggleston 285153f621 Legacy sstables with multi block range tombstones create invalid bound sequences
Patch by Blake Eggleston; Reviewed by Sam Tunnicliffe and Aleksey Yeschenko for CASSANDRA-14823
2018-10-16 12:37:24 -07:00
Blake Eggleston ab0e30e759 Reverse order reads can return incomplete results
Patch by Blake Eggleston; Reviewed by Sam Tunnicliffe for CASSANDRA-14803
2018-10-04 12:46:21 -07:00
Aleksey Yeshchenko 45937def31 DESC order reads can fail to return the last Unfiltered in the partition
patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe and Benedict
Elliott Smith for CASSANDRA-14766
2018-09-25 17:02:06 +01:00
Ariel Weisberg f7431b4328 Transient Replication and Cheap Quorums
Patch by Blake Eggleston, Benedict Elliott Smith, Marcus Eriksson, Alex Petrov, Ariel Weisberg; Reviewed by Blake Eggleston, Marcus Eriksson, Benedict Elliott Smith, Alex Petrov, Ariel Weisberg for CASSANDRA-14404

Co-authored-by: Blake Eggleston <bdeggleston@gmail.com>
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
2018-08-31 21:34:22 -04:00
Jay Zhuang d6cc594325 New Bloomfilter format without changing the byte ordering
patch by Jay Zhuang; reviewed by jasobrown for CASSANDRA-9067
2018-01-19 06:40:50 -08:00
Jeff Jirsa 4a2b516a34 Extra range tombstone bound creates double rows in 3.0
Patch by Jeff Jirsa; Reviewed by Aleksey Yeschenko for CASSANDRA-14008
2017-12-12 09:52:19 -08:00
Aleksey Yeschenko 912fdb3ea4 Switch to CRC32 for sstable metadata checksums
patch by Aleksey Yeschenko; reviewed by Marcus Eriksson for
CASSANDRA-13953
2017-10-17 16:48:32 +01:00
Marcus Eriksson cfee3e93be Checksum sstable metadata
Patch by marcuse; reviewed by Jason Brown for CASSANDRA-13321
2017-10-06 15:25:28 +02:00
Sam Tunnicliffe 62092e45c8 Fix current position calculation in OldFormatDeserializer
Patch by Sam Tunnicliffe; reviewed by Jeff Jirsa for CASSANDRA-13525

This patch also adds a unit test for CASSANDRA-13236.
2017-05-24 19:01:25 +01:00
Branimir Lambov f97db26f8e Adds the ability to use uncompressed chunks in compressed files
Triggered when size of compressed data surpasses a configurable
threshold.

Patch by Branimir Lambov; reviewed by Ropert Stupp for CASSANDRA-10520
2017-02-21 18:05:18 +02:00
Sylvain Lebresne 4a2464192e Remove pre-3.0 compatibility code for 4.0
patch by Sylvain Lebresne; reviewed by Aleksey Yeschenko for CASSANDRA-12716
2016-11-30 10:23:18 +01:00
Branimir Lambov 904cb5d10e Change commitlog and sstables to track dirty and clean intervals.
patch by Branimir Lambov; reviewed by Sylvain Lebresne for
CASSANDRA-11828
2016-08-05 15:38:37 +02:00
Sylvain Lebresne 78a3d2bba9 Merge commit '849a438690aa97a361227781108cc90355dcbcd9' into cassandra-3.0 2016-05-12 15:19:15 +02:00
Paulo Motta e8651b6625 Support streaming of older version sstables in 3.0
patch by Paulo Motta; reviewed by Yuki Morishita for CASSANDRA-10990
2016-03-17 10:04:44 -05:00
Benedict Elliott Smith 6094974714 9975: Flatten Iterator Transformation Hierarchy
To improve clarity of control flow, all iterator transformations
are applied via a single class that manages an explicit stack of
named transformation objects.

patch by benedict; reviewed by branimir for CASSANDRA-9975
2015-10-26 20:59:06 +00:00
Sylvain Lebresne 89293efc7d Update current format sstables for LegacySSTableTest 2015-10-16 17:18:45 +02:00
Robert Stupp 1b823ec2c1 Ninja fix failing LegacySSTableTest 2015-09-18 12:36:26 +02:00
Robert Stupp 51b1a1c6d3 Update index file format
patch by Robert Stupp; reviewed by Ariel Weisberg for CASSANDRA-10314
2015-09-14 22:06:37 +02:00
Robert Stupp 16497fd93f ninja-fix failing LegacySSTableTest 2015-09-13 14:18:46 +02:00
Robert Stupp 0600d7dc03 CFS.loadNewSSTables() broken for pre-3.0 sstables
patch by Robert Stupp; reviewed by Blake Eggleston for CASSANDRA-10237
2015-09-11 10:49:56 +02:00
Jake Luciani ae374107b7 ninja fix LegacySSTable test with new versioned files from 2.0 2014-07-09 16:21:36 -04:00
Vijay Parthasarathy db4da73e58 Save EC2Snitch topology information in system table - take 2
patch by Vijay; reviewed by Jason Brown for CASSANDRA-5171
2013-07-09 19:08:42 -07:00
Jonathan Ellis 7f2c3a8e40 Removed compatibility with pre-1.2.5 sstables and network messages
patch by jbellis; reviewed by marcuse for CASSANDRA-5511
2013-04-26 13:17:39 -05:00
Sylvain Lebresne 9a76e646e6 Finer-grained control over data directories
patch by slebresne; reviewed by xedin for CASSANDRA-2749
2012-01-04 16:08:48 +01:00
Sylvain Lebresne aef5e6aa25 merge from 1.0
git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@1211849 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 12:07:13 +00:00
Gary Dusbabek 8c22c8aec4 update LegacySSTableTest data files. patch by stuhood, reviewed by gdusbabek. CASSANDRA-1822
git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@1053394 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 17:15:47 +00:00
Gary Dusbabek 12eb0571e2 implement a legacy sstable test. Patch by Stu Hood, reviewed by Gary Dusbabek. CASSANDRA-767
git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@934149 13f79535-47bb-0310-9956-ffa450edef68
2010-04-14 19:51:55 +00:00