Commit Graph

29072 Commits

Author SHA1 Message Date
Francisco Guerrero 9c796dfb27 Skip ColumnFamilyStore#topPartitions initialization when client or tool mode
This commit skips the initialization of `topPartitions` in `org.apache.cassandra.db.ColumnFamilyStore`
when running in client or tool mode. The `TopPartitionTracker` class will attempt to query the system
keyspace, which when running in client or tool mode will not be part of the KeyspaceMetadata. This
causes a warning to be printed out with a stacktrace that can be misleading. The warning is similar to
this:

```
WARN org.apache.cassandra.db.SystemKeyspace: Could not load stored top SIZES partitions for ...
org.apache.cassandra.db.KeyspaceNotDefinedException: keyspace system does not exist
        at org.apache.cassandra.schema.Schema.validateTable(Schema.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
        at org.apache.cassandra.cql3.QueryProcessor.parseAndPrepare(QueryProcessor.java:xxx) ~[?:?]
        ...
```

In this commit, we check whether we run in client or tool mode, and skip initialization
of `topPartitions` in those cases.

Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRA-18697
2023-08-01 13:14:40 -07:00
Ekaterina Dimitrova 1c7e7db2d0 Fix BulkLoader ignoring cipher suites options.
patch by Dan Jatnieks; reviewed by Ekaterina Dimitrova and Jon Meredith for CASSANDRA-18582
2023-08-01 14:38:01 -04:00
Ekaterina Dimitrova 57269bbbc1 Merge branch 'cassandra-4.1' into trunk 2023-08-01 14:00:49 -04:00
Ekaterina Dimitrova fb7e4e7c48 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-01 13:59:52 -04:00
Daniel Jatnieks 4a2a585ec0 Fix BulkLoader ignoring cipher suites options.
patch by Dan Jatnieks; reviewed by Ekaterina Dimitrova and Jon Meredith for CASSANDRA-18582
2023-08-01 13:49:29 -04:00
Ekaterina Dimitrova cdefe1e8f9 Fix javadoc task
patch by Ekaterina Dimitrova and Zili Chen; reviewed by Jacek Lewandowski, Stefan Miklosovic and Brandon Williams for CASSANDRA-17687
2023-08-01 12:52:17 -04:00
Stefan Miklosovic e4414cc268
Upgrade AssertJ to version 3.24.2
patch by Shylaja Kokoori; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17951
2023-07-31 15:57:22 +02:00
Stefan Miklosovic c6f0521406
ninja fix: do not resolve Corretto library to build/test/lib/jars 2023-07-31 08:34:45 +02:00
Mick Semb Wever 5815f0d5eb
Fix (unsupported) big endian unaligned architecture (s390x)
patch by Shahid Shaikh; reviewed by Mick Semb Wever, Brandon Williams for CASSANDRA-17723
2023-07-29 10:39:56 +02:00
Shailaja Koppu 933137fb14 CIDR filtering authorizer
Patch by Shailaja Koppu, Yifan Cai; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRA-18592

Co-Authored-By: Yifan Cai <ycai@apache.org>
2023-07-28 20:10:02 -07:00
jkonisa f078c02cb5 Adding Mutual TLS authenticators for client & internode connections
Patch by Jyothsna Konisa & Dinesh Joshi; reviewed by Yifan Cai, Jon Meredith,
Yuki Morishita & Dinesh Joshi for CASSANDRA-18554

Co-Authored-By: Dinesh Joshi <djoshi@apache.org>
2023-07-28 13:54:06 -07:00
Mick Semb Wever 192a639088
Update netbeans project files: new src/test paths, new dependencies classpath, and removal of jdk selection
WRT to the "jdk selection" removal, which no longer appears to be working for freeform projects, you now have to start netbeans with the jdk you want to run contextual actions with.

 patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-18687
2023-07-28 21:30:39 +02:00
Ekaterina Dimitrova e24e591753 Merge branch 'cassandra-4.1' into trunk 2023-07-28 15:17:04 -04:00
Ekaterina Dimitrova a3e7558ebb Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-28 15:16:27 -04:00
Ekaterina Dimitrova 31f65c12de Merge branch 'cassandra-3.11' into cassandra-4.0 2023-07-28 14:38:08 -04:00
Ekaterina Dimitrova bee215cce6 Merge branch 'cassandra-3.0' into cassandra-3.11 2023-07-28 14:35:16 -04:00
Ekaterina Dimitrova 39db44adff Fix dtest-jar
patch by Ekaterina Dimitrova; reviewed by Brandon Williams for CASSANDRA-15255
2023-07-28 14:31:17 -04:00
Andrés de la Peña 98680e8708 Remove 3.x from the versions checked for prepared statement behaviour
patch by Andrés de la Peña; reviewed by Mick Semb Wever for CASSANDRA-18695
2023-07-28 17:03:54 +01:00
Stefan Miklosovic c2d42500a8
Merge branch 'cassandra-4.1' into trunk 2023-07-28 17:16:05 +02:00
Stefan Miklosovic 778f9f3ed5
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-28 17:11:15 +02:00
Stefan Miklosovic a0fdda1976
Remove AssertJ from the production code
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18700
2023-07-28 17:09:52 +02:00
Andrés de la Peña 5a82c04fd3 Add vector similarity functions
patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova and Maxwell Guo for CASSANDRA-18640

Co-authored-by: Jonathan Ellis <jbellis@datastax.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2023-07-28 15:50:32 +01:00
Mick Semb Wever 4bbfd64fcd
Lift MessagingService.minimum_version to 40
patch by Mick Semb Wever; reviewed by Andrés de la Peña García, Maxim Muzafarov for CASSANDRA-18314
2023-07-28 16:13:32 +02:00
ayushis 6ab45971fc
Introduce pluggable crypto providers and default to Amazon Corretto Crypto Provider
patch by Ayushi Singh; reviewed by Stefan Miklosovic, Michael Semb Wever and Maxim Muzafarov for CASSANDRA-18624

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-07-28 12:15:33 +02:00
Bereng a9d1712aec Ninja-fix CHANGES.txt for CASSANDRA-18648
Patch by Berenguer Blasi; reviewed by Branimir Lambov, Jacek Lewandowski, Jakub Zytka, Piotr Kolaczkowski for CASSANDRA-18648
2023-07-28 06:59:56 +02:00
Caleb Rackliffe 3ba4cd24a0 ninja-fix: make sure testVirtualTableThroughIndexLifeCycle disabled auto-compaction 2023-07-27 14:02:10 -05:00
Jacek Lewandowski c6cb1cd245 Merge branch 'cassandra-4.1' into trunk 2023-07-27 11:26:21 +02:00
Jacek Lewandowski efba69dbe1 Add simulator/test to IntelliJ configuration
Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-18698
2023-07-27 11:25:08 +02:00
Jacek Lewandowski 738dfde735 Fix building dtest.jar (part 2)
Excludes META-INF/license/** from the unpacked content which fixes building dtest-jar on case-insensitive file systems

Patch by Jacek Lewandowski; reviewed by Brandon Williams and Ekaterina Dimitrova for CASSANDRA-18690
2023-07-27 10:14:15 +02:00
Caleb Rackliffe 94964b54b6 minor fixes after rebase on trunk at c1bf002234 2023-07-26 13:35:07 -05:00
Caleb Rackliffe 83203a14c4 Importer should build SSTable indexes successfully before making new SSTables readable
- Avoid validation in response to SSTableAddedNotification, as it should already have been done somewhere else
- Change SSTableWriter to prevent commit when a failure is thrown out of an index build

patch by Caleb Rackliffe; reviewed by Mike Adamson and Andres de la Peña for CASSANDRA-18670
2023-07-26 13:35:07 -05:00
Caleb Rackliffe 3e38b3d641 Release notes and README updates for CEP-7 (Storage-Attached Indexes) 2023-07-26 13:35:07 -05:00
Caleb Rackliffe 394d4b1168 Add support for index implementation selection via USING for CREATE INDEX
patch by Caleb Rackliffe; reviewed by Maxwell Guo and Andres de la Peña for CASSANDRA-18615
2023-07-26 13:35:07 -05:00
Jonathan Ellis b57181032d Fix KeyRangeIntersectionIterator count
patch by Jonathan Ellis; reviewed by Andrés de la Peña
2023-07-26 13:35:07 -05:00
Mike Adamson 2531cb0458 Fix concurrency in bbtree reader by cloning state
patch by Mike Adamson; reviewed by Andrés de la Peña and Caleb Rackliffe for CASSANDRA-18669
2023-07-26 13:35:07 -05:00
Mike Adamson eb208d3561 Add basic text analysis to SAI, including "case_sensitive", "normalize", and "ascii" modes
patch by Mike Adamson; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-18479
2023-07-26 13:35:07 -05:00
Mike Adamson cba3e19ccd Query all ranges at once for SAI distributed queries
patch by Mike Adamson; reviewed by Caleb Rackliffe, Andres de la Peña, and Berenguer Blasi for CASSANDRA-18515
2023-07-26 13:35:07 -05:00
Piotr Kołaczkowski b396faf913 Various changes to SAI index validation
- Fix checksum calculation in IncrementalChecksumSequentialWriter
- Checksum per-SSTable and per-column components after streaming
- Avoid validating indexes when full rebuild is requested

patch by Piotr Kołaczkowski; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-18490

Co-authored-by: Piotr Kołaczkowski <pkolaczk@gmail.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
2023-07-26 13:35:07 -05:00
Mike Adamson 6f125c8042 Numeric on-disk index write and search
Includes:
  - The disk/v1/kdtree package containing the
kdtree writer and reader
  - The implementation code to tie these into
the existing read and write paths. The main parts
of this are the NumericIndexWriter and the
NumericIndexSegmentSearcher
  - Additional testing for the new code

patch by Mike Adamson; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-18067

Co-authored-by: Mike Adamson <madamson@datastax.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Piotr Kołaczkowski <pkolaczk@gmail.com>
Co-authored-by: Jason Rutherglen <jason.rutherglen@gmail.com>
Co-authored-by: Zhao Yang <zhaoyangsingapore@gmail.com>
2023-07-26 13:35:07 -05:00
Piotr Kołaczkowski 98fefc1557 Stream all compatible components registered by an SSTable
patch by Piotr Kołaczkowski; reviewed by Andrés de la Peña and Caleb Rackliffe for CASSANDRA-18345
2023-07-26 13:35:07 -05:00
Jonathan Ellis ebea2ba6ad Upgrade to lucene-core 9.7.0
Notes on the upgrade path:
- RamIndexOutput is replaced with ResettableByteBuffersIndexOutput, an extension of ByteBuffersIndexOutput, which was the closest thing to a replacement of RamIndexOutput.
- Lucene exposes the code we needed from DirectReaders more or less directly in DirectReader now, so the old copied code has been deleted.
- Lucene changed its data files to be little endian, but to keep its compatibility story simple it retained BE for the header and footer ints. That's the cause of the changes in SAICodecUtils.
- We could gain a bit of performance making our own code natively little endian but that is too big of a change for this patch.

patch by Jonathan Ellis; reviewed by Andrés de la Peña, Caleb Rackliffe, and Mike Adamson for CASSANDRA-18494
2023-07-26 13:35:07 -05:00
Zhao Yang 661a1d5bb6 fix Segment#intersects to compare bound instead of token 2023-07-26 13:35:07 -05:00
Zhao Yang 93b89b2e79 send SSTableAddedNotification before MemtableDiscardedNotification to fix index data visilibity issue 2023-07-26 13:35:07 -05:00
Caleb Rackliffe c712312b8f post-rebase fixes for the rebase on trunk at fad1f74570 2023-07-26 13:35:07 -05:00
Andrés de la Peña 01aeb616be Unify CQLTester#waitForIndex and SAITester#waitForIndexQueryable
patch by Andrés de la Peña; reviewed by Caleb Rackliffe for CASSANDRA-18521
2023-07-26 13:35:07 -05:00
Andrés de la Peña 631ae36ca5 Allow CQL queries on multiple indexes without ALLOW FILTERING
patch by Andrés de la Peña; reviewed by Berenguer Blasi for CASSANDRA-18217
2023-07-26 13:35:07 -05:00
Mike Adamson e5e0f3a844 Literal on-disk index and index write path (#9)
This commit contains the following additions
 to SAI:
 - The index write path and index building
   based around StorageAttachedIndexBuilder
   and StorageAttachedIndexWriter
 - The on-disk index versioning using the
   SSTable Descriptor analog IndexDescriptor
   with Version and OnDiskFormat
 - The literal on-disk index using the
   LiteralIndexWriter

patch by Mike Adamson; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-18062

Co-authored-by: Mike Adamson <mikeatdot@gmail.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Andres de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Piotr Kołaczkowski <pkolaczk@gmail.com>
Co-authored-by: Jason Rutherglen <jason.rutherglen@gmail.com>
2023-07-26 13:35:07 -05:00
Mike Adamson cde91e56f0 In-memory index implementation with query path
This includes the following elements of the Storage Attached Index:
- Memtable-attached indexes backed by an in-memory trie structure for byte-comparable values
- Query path for the in-memory index
- Index status propagation
- Randomized testing for Memtable-attached indexes

patch my Mike Adamson; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-18058

Co-authored-by: Mike Adamson <madamson@datastax.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
2023-07-26 13:35:07 -05:00
Zhao Yang 303ca55a5d Add Index Group Interface for Storage Attached Index
patch by Zhao Yang; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-16092

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Andres de la Peña <a.penya.garcia@gmail.com>
2023-07-26 13:35:07 -05:00
Stefan Miklosovic 4a46992724
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-07-25 09:55:47 +02:00