Commit Graph

7126 Commits

Author SHA1 Message Date
Yifan Cai 659558c980 Enhance CQLSSTableWriter to notify client on sstable production
Patch by Yifan Cai; Reviewed by Francisco Guerrero for CASSANDRA-19800
2024-11-22 14:49:22 -08:00
Caleb Rackliffe 376fe2a9fe Streamline the serialized format for index status gossip messages
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-20058
2024-11-21 14:59:38 -06:00
Bereng af140beee5 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Flaky PstmtPersistenceTest take 2
2024-11-15 13:25:40 +01:00
Bereng 364b641abc Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Flaky PstmtPersistenceTest take 2
2024-11-15 13:19:36 +01:00
Bereng f3c29e08fa Flaky PstmtPersistenceTest take 2
patch by Berenguer Blasi; reviewed by Stefan Miklosovic for CASSANDRA-20055
2024-11-15 13:17:12 +01:00
Bereng 022002531d Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Flaky PstmtPersistenceTest
2024-11-11 09:47:11 +01:00
Bereng 4acce2af89 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Flaky PstmtPersistenceTest
2024-11-11 09:45:33 +01:00
Bereng 7ba691e3d3 Flaky PstmtPersistenceTest
patch by Berenguer Blasi; reviewed by Stefan Miklosovic for CASSANDRA-20055
2024-11-11 09:43:31 +01:00
Stefan Miklosovic 0f590133f8
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-11-06 22:27:28 +01:00
Josh McKenzie 8ea70cd1f0
Backport of CASSANDRA-17812: Rate-limit new client connection auth setup to avoid overwhelming bcrypt
This backport differs from CASSANDRA-17812 in such a way that by default the number
of auth request threads is set to 0. That will route all requests to request executor as before this change.
The patch in 5.0 and later sets the default number of auth request threads to 4.

patch by Josh McKenzie; reviewed by Chris Lohfink for CASSANDRA-20057

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2024-11-06 22:23:16 +01:00
Stefan Miklosovic 4b6dcf873b
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-11-06 14:37:18 +01:00
Stefan Miklosovic 17418a2ba0
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-11-06 14:33:00 +01:00
Stefan Miklosovic 6093c2d99b
Support UDTs and vectors as clustering keys in descending order
patch by Stefan Miklosovic; reviewed by David Capwell for CASSANDRA-20050
2024-11-06 14:28:48 +01:00
Stefan Miklosovic 008d04d8df
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-11-06 09:55:16 +01:00
Stefan Miklosovic 521891c196
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-11-06 09:47:00 +01:00
Stefan Miklosovic 181ddc0600
Fix CQL in snapshot's schema which did not contained UDTs used as reverse clustering columns
patch by Stefan Miklosovic; reviewed by David Capwell for CASSANDRA-20036
2024-11-06 09:41:45 +01:00
mck 34bed3df49
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add nodetool checktokenmetadata command that checks TokenMetadata is insync with Gossip endpointState
2024-11-05 22:46:27 +01:00
jaydeepkumar1984 e5c919f273
Add nodetool checktokenmetadata command that checks TokenMetadata is insync with Gossip endpointState
patch by Jaydeepkumar Chovatia; reviewed by Brandon Williams, Mick Semb Wever for CASSANDRA-18758
2024-11-05 22:42:28 +01:00
Bereng 0e11be9ce6 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  CASSANDRA-19986 Prepared statements cache computation improvements
2024-11-04 10:02:47 +01:00
Bereng 94c2a09772 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  CASSANDRA-19986 Prepared statements cache computation improvements
2024-11-04 10:00:03 +01:00
Bereng ff54fd5ffd CASSANDRA-19986 Prepared statements cache computation improvements
patch by Berenguer Blasi; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-19986
2024-11-04 09:56:32 +01:00
Sam Tunnicliffe 8153a0b321 Merge branch 'cassandra-4.1' into cassandra-5.0 2024-11-01 19:01:16 +00:00
Sam Tunnicliffe 9ff31e8060 Equality check for Paxos.Electorate should not depend on collection types
Patch by Sam Tunnicliffe; reviewed by Marcus Eriksson for CASSANDRA-19935
2024-11-01 18:53:22 +00:00
Bereng 5e4ff921af Add extra compaction junit
patch by Berenguer Blasi; reviewed by Branimir Lambov, Michael Semb Wever for CASSANDRA-19863
2024-10-24 08:13:05 +02:00
Bereng 38857dc047 Add extra compaction junit
patch by Berenguer Blasi; reviewed by Branimir Lambov for CASSANDRA-19863
2024-10-16 13:36:13 +02:00
mck dcff5a0fad
Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add configurable batchlog endpoint strategies
2024-10-15 13:43:31 +02:00
mck 26bf80706b
Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add configurable batchlog endpoint strategies
2024-10-15 13:38:12 +02:00
shunsaker b8c5436293
Add configurable batchlog endpoint strategies
Batchlog endpoint strategy was previously only random placements on other racks.  Options now are random_remote, prefer_local, dynamic_remote, and dynamic.

 patch by Shayne Hunsaker; reviewed by Mick Semb Wever, Brandon Williams for CASSANDRA-18120
2024-10-15 13:34:40 +02:00
Caleb Rackliffe 019c9118d4 Use SinglePartitionReadCommand for index queries that use strict filtering
patch by Caleb Rackliffe; reviewed by Ariel Weisberg for CASSANDRA-19968
2024-10-11 15:25:02 -05:00
Tiago Alves 50d94f4b46
Enables IAuthenticator's to return own AuthenticateMessage
Allows custom implementations of IAuthenticator to return their own
AuthenticateMessage based on ClientState information.

ClientState contains information about driver's name and version which
could be used to determine the contents of the AuthenticateMessage that
is sent back to the clients. This enables, for instance, returning
driver's known authenticator implementations (e.g. DseAuthenticator)
which enables SASL negotiation.

 patch by Tiago Alves; reviewed by Mick Semb Wever, Andy Tolbert for CASSANDRA-19984
2024-10-11 14:31:44 +02:00
Stefan Miklosovic 0e5aa9b912
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-10-10 09:33:56 -06:00
Stefan Miklosovic dbc87a44d1
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-10-10 09:31:20 -06:00
Dmitry Konstantinov d939e40dfb
Fix flakiness of TopPartitionsTest
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic, Berenguer Blasi for CASSANDRA-19991
2024-10-10 08:11:11 -06:00
Tiago Alves 2dea5c7588
Use ParameterizedClass for all auth-related implementations
Uses ParameterizedClass for IAuthorizer, INetworkAuthorizer, and
IRoleManager implementations enabling those to be configurable from
parameters specified directly in cassandra.yaml.

Opportunistically makes consistent the initialization and setting of
all auth-related implementations and removes code duplication.

Notes:
 * IInternodeAuthenticator implementations are expected to be set as
   default directly in DatabaseDescriptor instead of done via
   AuthConfig.applyAuth(). This is assumed in tests and client logic.
   For instance ReconnectableSnitchHelperTest fetches this authenticator
   before calling daemonInitialize(). Also, BulkLoader fetches this
   directly when creating an outbound connection.
 * Changing this behavior in BulkLoader causes a cascade of changes.
   First, one would need to add AuthConfig.applyAuth() directly in
   clientInitialize() and then would need to enable all the additional
   classes that this change causes. Long term this might be justified
   as if we're depending on the auth logic to be properly set. However,
   in the context of this change it was decided to postpone further
   changes.
 * Standardize auth-related configurations by using a short-form with
   the class name instead of the full qualified class name containing
   the package name.

 patch by Tiago Alves; reviewed by Mick Semb Wever, Stefan Miklosovic for CASSANDRA-19946
2024-10-09 13:51:51 +02:00
Maxim Muzafarov 9dfcfaee65 Merge branch 'cassandra-4.1' into cassandra-5.0 2024-10-02 15:30:20 +02:00
Maxim Muzafarov ad4ad5ef5a Fix race condition in DecayingEstimatedHistogramReservoir during rescale
patch by Maxim Muzafarov; reviewed by Caleb Rackliffe for CASSANDRA-19365

Co-authored-by: Jakub Zytka <jakub.zytka@datastax.com>
2024-10-02 15:14:20 +02:00
Stefan Miklosovic 07c1f93b06
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-09-27 14:06:25 +02:00
Stefan Miklosovic e5ea7c950e
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-09-23 17:09:25 +02:00
Stefan Miklosovic 2bcd68f8be
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-09-23 17:07:49 +02:00
Sunil Ramchandra Pawar 06a05ccde5
Fix indexing of a frozen collection that is the clustering key and reversed
patch by Sunil Ramchandra Pawar; reviewed by David Capwell, Stefan Miklosovic for CASSANDRA-19889
2024-09-23 17:06:46 +02:00
Stefan Miklosovic 703dd13a54
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-09-18 23:10:10 +02:00
Stefan Miklosovic 7b1eb1f0b7
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-09-18 22:48:54 +02:00
Stefan Miklosovic 39b1c2df89
Emit error when altering a table with non-frozen UDTs with nested non-frozen collections the same way as done upon table creation
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-19925
2024-09-18 22:44:39 +02:00
Bereng f26457afe4 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add extra compaction junit
2024-09-18 08:47:35 +02:00
Bereng 5e37fcde46 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add extra compaction junit
2024-09-18 08:45:01 +02:00
Bereng 366ee9da6c Add extra compaction junit
patch by Berenguer Blasi; reviewed by Branimir Lambov for CASSANDRA-19863
2024-09-18 08:41:42 +02:00
Caleb Rackliffe 2c94b27bed Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Safer handling of out-of-range tokens
2024-09-17 17:21:16 -05:00
Caleb Rackliffe 8670d98498 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Safer handling of out-of-range tokens
2024-09-17 17:09:57 -05:00
Caleb Rackliffe b4f1c6d250 Safer handling of out-of-range tokens
patch by Caleb Rackliffe; reviewed by Mick Semb Wever for CASSANDRA-13704

Co-authored-by: Sam Tunnicliffe <sam@beobal.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Mick Semb Wever <mck@apache.org>
Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
2024-09-17 17:04:11 -05:00
Stefan Miklosovic 78ab095c87
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-09-15 20:05:52 +02:00
Stefan Miklosovic 48eab9afd8
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-09-15 19:57:53 +02:00
maxwellguo 9f18aab1dc
Fix millisecond and microsecond precision for commit log replay
patch by Maxwell Guo; reviewed by Brandon Williams, Stefan Miklosovic for CASSANDRA-19448
2024-09-13 15:42:20 +02:00
Stefan Miklosovic ddb01d2f8e
CASSANDRA-19911 Remove MemtableSizeTest
This is a ninja / leftover from CASSANDRA-17298, we replaced this test but
forgot to remove it as was done in other branches.
2024-09-12 08:56:30 +02:00
Stefan Miklosovic 971747e3e2
Make configuration entries in memtable section order-independent
patch by Stefan Miklosovic; reviewed by David Capwell for CASSANDRA-19906

Co-authored-by: David Capwell <dcapwell@apache.org>
2024-09-11 08:37:59 +02:00
Stefan Miklosovic c76fae6a8e
Merge branch 'cassandra-4.1' into cassandra-5.0
This merge just removes LongToken from SkipListMemtable and it replaces it with
a partitioner-agnostic DatabaseDescriptor.getPartitioner().getRandomToken().
The issues in 4.0 / 4.1 are not present in later branches anymore however we
identified that the changes done in 5.0+ are welcome so we included them as well.
2024-09-10 10:09:59 +02:00
Stefan Miklosovic 6ec8c5bb81
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-09-10 10:00:38 +02:00
Dmitry Konstantinov c56ba3b317
Improve accuracy of memtable heap usage tracking
Fix estimateRowOverhead in Memtable: ByteBuffer in Partition key was not counted
Fix non-counted size of "columns" field in Columns.unsharedHeapSize
BTree.sizeOfStructureOnHeap wrongly reported a non-zero size for EMPTY_LEAF shared constant value
Fix MemtableSizeTest flakeness by not measuring of allocator and ColumnFamilyStore/Keyspace

Patch by Dmitry Konstantinov; reviewed by Branimir Lambov, Stefan Miklosovic for CASSANDRA-17298
2024-09-09 12:00:11 +02:00
Abe Ratnofsky b4894226c5 Add guardrail for enabling usage of VectorType
patch by Abe Ratnofsky; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-19903
2024-09-06 15:19:03 -07:00
Jacek Lewandowski 2521b83c92 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix rendering UNSET collection types in query tracing
2024-08-30 10:41:41 +02:00
Jacek Lewandowski 505aff4517 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix rendering UNSET collection types in query tracing
2024-08-30 10:41:39 +02:00
Lukasz Antoniak c53d3ac8c6 Fix rendering UNSET collection types in query tracing
Patch by Lukasz Antoniak reviewed by Jacek Lewandowski for CASSANDRA-19880
2024-08-30 10:41:38 +02:00
Ariel Weisberg f7d407ba31 Merge branch 'cassandra-4.1' into cassandra-5.0 2024-08-21 16:04:44 -04:00
Ariel Weisberg 02f38208b1 Merge branch 'cassandra-4.0' into cassandra-4.1 2024-08-21 16:03:51 -04:00
Dmitry Konstantinov 6da9141d3c Fix latency reported by ideal consistency level monitoring
patch by Dmitry Konstantinov; reviewed by Ariel Weisberg for CASSANDRA-19651
2024-08-21 16:01:46 -04:00
Caleb Rackliffe 5abe213ad0 Streamline tests based on RandomIntersectionTester
patch by Caleb Rackliffe; reviewed by Stefan Miklosovic for CASSANDRA-19823
2024-08-16 13:57:24 -05:00
Maxwell Guo a846987533
Throw ConfigurationException when commitlog_disk_access_mode is direct but direct IO is not supported by filesystem
patch by Maxwell Guo; reviewed by Branimir Lambov, Stefan Miklosovic for CASSANDRA-19812
2024-08-16 09:00:37 +02:00
Caleb Rackliffe 47fe3a12cf Merge branch 'cassandra-5.0.0' into cassandra-5.0
* cassandra-5.0.0:
  Use default commitlog settings in test YAMLs
2024-08-15 11:09:43 -05:00
Caleb Rackliffe c91ffe8a9f Merge branch 'cassandra-4.1' into cassandra-5.0.0
* cassandra-4.1:
  Use default commitlog settings in test YAMLs
2024-08-15 10:49:50 -05:00
Caleb Rackliffe e5fc9b3e14 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Use default commitlog settings in test YAMLs
2024-08-15 10:19:46 -05:00
Caleb Rackliffe 93415c91af Use default commitlog settings in test YAMLs
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-19830
2024-08-15 10:12:39 -05:00
David Capwell b4087b7f5b Merge branch 'cassandra-5.0.0' into cassandra-5.0 2024-08-14 14:50:41 -07:00
David Capwell 3afa2585d9 Memtable allocation type unslabbed_heap_buffers_logged will cause an assertion error for TrieMemtables and SegmentedTrieMemtables
patch by David Capwell; reviewed by Brandon Williams, Caleb Rackliffe for CASSANDRA-19835
2024-08-14 14:49:51 -07:00
Stefan Miklosovic 9a13a75940
Merge branch 'cassandra-5.0.0' into cassandra-5.0 2024-08-09 13:53:01 +02:00
Stefan Miklosovic aca11d4fc3
Fix tests extending FuzzTestBase when running test-compression profile
patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-19820
2024-08-09 13:44:03 +02:00
Stefan Miklosovic e2495e182f
Merge branch 'cassandra-5.0.0' into cassandra-5.0 2024-08-05 00:51:06 +02:00
Stefan Miklosovic 5ab976d796
Fix direct IO support always being evaluated to false upon the first start of a node
patch by Stefan Miklosovic; reviewed by Branimir Lambov, Maxwell Guo for CASSANDRA-19779
2024-08-04 23:59:35 +02:00
Arun Ganesh 273975ef26 Prioritize built indexes in IndexStatusManager
Patch by Arun Ganesh; reviewed by Caleb Rackliffe and Zhao Yang for CASSANDRA-19400
2024-07-24 15:28:19 -05:00
Stefan Miklosovic 52a513f724
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-07-10 10:47:09 +02:00
Stefan Miklosovic 31e2edf052
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-07-10 10:42:39 +02:00
Stefan Miklosovic a5767a5834
Fix schema.cql created by a snapshot after dropping more than one column
patch by Stefan Miklosovic; reviewed Benjamin Lerer, Francisco Guerrero for CASSANDRA-19747
2024-07-10 10:34:54 +02:00
Stefan Miklosovic 63b4e1c41c
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-07-09 17:09:30 +02:00
Stefan Miklosovic a878adfc89
Do not create a role if ALTER ROLE IF EXISTS operates on non-existing role
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19749
2024-07-09 17:03:25 +02:00
Benjamin Lerer 43d99c2259 Merge branch cassandra-4.1 into cassandra-5.0 2024-06-27 12:36:18 +02:00
Benjamin Lerer ef8bc82f1b Merge branch cassandra-4.0 into cassandra-4.1 2024-06-27 12:27:55 +02:00
Benjamin Lerer 90208c0a29 Makes LWT conditions behavior on frozen and non-frozen columns consistent for null column values
Patch by Benjamin Lerer; review by Ekaterina Dimitrova for CASSANDRA-19637
2024-06-27 10:15:03 +02:00
Benedict Elliott Smith 53b06453b7 Refresh stale paxos commit
patch by Benedict Elliott Smith; review by Blake Eggleston for CASSANDRA-19617
2024-06-11 15:24:57 +02:00
Benedict Elliott Smith 8c165b4cc0 Refresh stale paxos commit
patch by Benedict Elliott Smith; review by Blake Eggleston for CASSANDRA-19617
2024-06-10 18:37:08 +02:00
Brandon Williams 258a04a361 Ninja remove unused imports 2024-06-04 08:26:10 -05:00
Alex Petrov 617a75843c Merge branch 'cassandra-4.1' into cassandra-5.0 2024-05-31 11:24:37 +02:00
Alex Petrov dc17c29724 Add native transport deadline, an ultimate deadline for all tasks related to a specific request
* Add an ability to base _replica_ side queries on the queue time
      * Use queue time as a base for message timeouts
      * Use native transport deadline for internode messages
      * Make sure that local runnables respect transport timeouts and deadlines
      * Make sure that remote mutation handler respects message expiration times

Patch by Alex Petrov; reviewed by Caleb Rackliffe for CASSANDRA-19534
2024-05-31 11:10:58 +02:00
Josh McKenzie 9ebe0aa08a Replace getStderr calls with getCleanedStderr calls in tests checking for emptiness
Patch by Jon Meredith; reviewed by Josh McKenzie and Berenguer Blasi for CASSANDRA-17815

Co-authored-by: Jon Meredith <jmeredithco@gmail.com>
Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
2024-05-31 10:59:56 +02:00
Stefan Miklosovic 326bf4b3f5
Resolve the oldest hints just from descriptors and current writer if available
patch by Stefan Miklosovic; reviewed by Aleksey Yeschenko for CASSANDRA-19600
2024-05-02 23:02:09 +02:00
Stefan Miklosovic d1101eeccc
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-05-02 10:43:28 +02:00
Stefan Miklosovic 85039aa8c5
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-05-02 10:39:28 +02:00
Stefan Miklosovic 334ca05730
Make nodetool import congruent with the documentation by not relying on the folder structure of the imported SSTable files
nodetool import requires keyspace and table on the command line to import SSTables to. This
was not always working as specifying keypace and table while having SSTables located in the
directory structure which differed on keyspace and table (dir and parent dir) just
ignored them.

patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19401
2024-05-02 10:32:55 +02:00
ci worker 1b1f88e38a Merge branch 'cassandra-4.1' into cassandra-5.0 2024-05-01 14:35:08 -07:00
Brandon Williams ae9be29918 Merge branch 'cassandra-4.1' into cassandra-5.0 2024-04-30 17:01:23 -05:00
Chris Lohfink a6e80317de apply schema if schema digest differs
Patch by clohfink; reviewed by brandonwilliams and jwest for
CASSANDRA-19578
2024-04-30 16:59:34 -05:00
Jon Meredith 6559983d6c Merge branch 'cassandra-4.1' into cassandra-5.0 2024-04-25 14:01:41 -06:00
Jon Meredith 858a2b2321 Merge branch 'cassandra-4.0' into cassandra-4.1 2024-04-25 14:00:47 -06:00
Jon Meredith 9157d98e4c Streaming exception race creates corrupt transaction log files that prevent restart
patch by Jon Meredith; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-18736
2024-04-25 13:59:59 -06:00
Jacek Lewandowski 82297b490e Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix few types issues and implement types compatibility tests
2024-04-18 12:33:55 +02:00
Jacek Lewandowski 445ae1a4b1 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix few types issues and implement types compatibility tests
2024-04-18 12:33:54 +02:00
Jacek Lewandowski f92998190c Fix few types issues and implement types compatibility tests
Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-19479
2024-04-18 12:33:52 +02:00
Caleb Rackliffe 9bfaee91c4 Optionally fail writes when SAI refuses to index a term value exceeding a configured maximum size
patch by Caleb Rackliffe; reviewed by Berenguer Blasi and Stefan Miklosovic for CASSANDRA-19493
2024-04-17 11:12:42 -05:00
Mick Semb Wever cada1a13c8
Vector search should be able to restrict on clustering keys when filtering isn't required
patch by Mick Semb Wever; reviewed by Caleb Rackliffe for CASSANDRA-19544
2024-04-11 00:25:59 +02:00
Mick Semb Wever f7c11bdcd4
Standalone Jenkinsfile
– ensure test file paths, and their suite names are unique (the latter was broken for cqlshlib and python dtests)
 – removal of properties and system-out in test xml happens in CassandraXMLJUnitResultFormatter
 – new jenkins agent labels and introduce agents sizes
 - ci_summary.html generation script, ref work submitted in apache/cassandra-builds#99
 – fix for stress-test and fqltool-test running on small
 - ant generate-test-report is limited to only running on individual test types (ci_parser.py provides ci_summary.html for the overview now)
 - each cell has a single retry, and the retry will happen on a different agent
 - on ci-cassandra the summary stage happens on the builtin, bc copyArtifacts on 15k+ files takes many hours otherwise
 - test-burn only needs two splits
 - dependency-check is disabled from the lint target until CASSANDRA-19213
 - add $DEBUG env var to in-tree scripts, turns on bash debug
 - fix FBUtilities' handling of gcp cos_containerd (kernel version comes with a trailing '+' character)

 patch by Aleks Volochnev, Mick Semb Wever; reviewed by Aleksandr Volochnev, Josh McKenzie, Maxim Muzafarov, Stefan Miklosovic for CASSANDRA-18594

Co-authored-by: Aleksandr Volochnev <a.volochnev@gmail.com>
Co-authored-by: Mick Semb Wever <mck@apache.org>
Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
Co-authored-by: Artem Chekunov <artem.v.chekunov@gmail.com>
2024-04-04 11:56:36 +02:00
Ekaterina Dimitrova b0150e86fb Clean up KeyRangeIterator classes
* replace KeyRangeConcatIterator's PriorityQeueu with List
* remove KeyRangeIterator.current and simplify
* remove injected exception and tests - not relevant to the current implementation
* expand randomized testing
* inline getCurrent() -> peek(); rename getCount to getMaxKeys
* redefine skipTo contract to not return a value (which saves unnecessary work when skipTo is called multiple times in a row)
* calling hasNext in skipTo is a pessimization; if the iterator is in DONE state, then skipTo will see it and avoid further effort; if it is not, then we are computing a next value that we're just going to throw away
* fix SingleNodeQueryFailureTest - tests now multi and single index
* rationalize/standardize the way we release SSTableIndexes in QueryController

patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, Ekaterina Dimitrova for CASSANDRA-19428

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Jonathan Ellis <jbellis@apache.org>
Co-authored-by: Piotr Kolaczkowski <pkolaczk@datastax.com>
Co-authored-by: Michael Marshall <michael.marshall@datastax.com>
2024-04-03 18:24:27 -04:00
David Capwell ca0b77d743 Repair fuzz tests fail with paxos_variant: v2
patch by David Capwell; reviewed by Blake Eggleston, Ekaterina Dimitrova for CASSANDRA-19042
2024-03-26 13:04:02 -07:00
Stefan Miklosovic 35d6e6ce9c
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-03-25 14:19:01 +01:00
Stefan Miklosovic 38408938cc
Do not go to disk for reading hints file sizes
patch by Stefan Miklosovic; reviewed by Aleksey Yeschenko, Jon Haddad, Chris Lohfink for CASSANDRA-19477
2024-03-25 14:08:02 +01:00
Caleb Rackliffe 46acaf22e6 Ensure SAI indexes empty byte buffers for types that allow them as a valid input
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-19461

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2024-03-22 11:33:27 -05:00
Mike Adamson 7aab61b063 Use glove vectors instead of random vectors in vector tests
- avoid randomisation to make tests more consistent
- use heap_buffers for VectorDistributedTest for consistency with other tests

patch by Mike Adamson; reviewed by Ekaterina Dimitrova for CASSANDRA-19185
2024-03-21 12:56:26 +00:00
Stefan Miklosovic 36a1ca5e48
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-03-19 14:57:11 +01:00
Stefan Miklosovic e4ae1f3a4f
Fix system_views.settings to handle array types
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-19475
2024-03-19 14:55:42 +01:00
Stefan Miklosovic 2f836fa596
Set uuid_sstable_identifiers_enabled to true for cassandra-latest.yaml
patch by Stefan Miklosovic; reviewed by Branimir Lambov, Jacek Lewandowski for CASSANDRA-19460
2024-03-12 13:33:08 +01:00
arkn98 a26fa6cf2c Revert switching to approxTime in Dispatcher
Patch by Arun Ganesh; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-19454
2024-03-07 15:35:30 -06:00
Branimir Lambov 06ed1afc34 Add an optimized default configuration to tests and make it available for new users
This patch adds a new configuration file, cassandra_latest.yaml, which changes
some of the settings to use new features we usually recommend to users,
including:
- Big Trie-Indexed SSTables
- Trie memtables
- Unified Compaction Strategy
- Storage Attached Index
- Off-heap objects memtables
- Direct-write commit log
- No storage compatibility

These changes are applied in new test targets for unit, in-jvm and python dtests that are
run pre-commit. When changes are made to the new config file, python dtest will use it
directly, but unit and in-jvm dtests require updates, respectively, to latest_diff.yaml
and InstanceConfig.java.

patch by Branimir Lambov; reviewed by Berenguer Blasi for CASSANDRA-18753
2024-03-07 11:08:44 +02:00
Caleb Rackliffe f7984627e7 Avoid possible consistency violations for SAI intersection queries over partially updated rows at consistency levels that require reconciliation
- Replica filtring protection now correctly accounts for short reads caused by coordinator filtering of merged rows.
- There is a new flag in ReadCommand that indicates whether the user query it belongs to requires reconciliation.
- Local SAI queries now degrade intersections to unions on unrepaired data if reconciliation is required and multiple mutable columns are restricted.

patch by Caleb Rackliffe; reviewed by Andres de la Peña and Alex Petrov for CASSANDRA-19018

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
2024-02-29 15:03:00 -06:00
Ekaterina Dimitrova 54cf65476a Fix NullPointerException in ANN+WHERE when adding rows in another partition
patch by Ekaterina Dimitrova; reviewed by Andres de la Pena for CASSANDRA-19404
2024-02-29 09:17:59 -05:00
Caleb Rackliffe 1d7bae3697 Record latencies for SAI post-filtering reads against local storage
patch by Caleb Rackliffe; reviewed by Mike Adamson for CASSANDRA-18940
2024-02-26 15:22:44 -06:00
Stefan Miklosovic bfc6e1241d
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-02-23 00:03:53 +01:00
Stefan Miklosovic b6b291e3bb
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-02-22 23:56:48 +01:00
Runtian Liu c2041ba45b
Filter remote DC replicas out when constructing the initial replica plan for the local read repair
patch by Runtian Liu; reviewed by Blake Eggleston and Stefan Miklosovic for CASSANDRA-19120
2024-02-22 23:21:16 +01:00
Andrés de la Peña 5b9321eee1 Merge branch 'cassandra-4.1' into cassandra-5.0 2024-02-08 11:33:23 +00:00
Andrés de la Peña 89a8155916 Merge branch 'cassandra-4.0' into cassandra-4.1 2024-02-08 11:11:07 +00:00
Andrés de la Peña 505f5af645 Ensure that repair doesn't exceed repair_session_space by running limiting validation parallelism
patch by Andrés de la Peña; reviewed by David Capwell for CASSANDRA-19336

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: David Capwell <dcapwell@apache.org>
2024-02-08 11:09:21 +00:00
Jacek Lewandowski 78dca99973 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Backport CASSANDRA-16418 to 3.x
2024-02-07 15:12:03 +01:00
Jacek Lewandowski d9dbd5e1d0 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Backport CASSANDRA-16418 to 3.x
2024-02-07 15:12:02 +01:00
Jacek Lewandowski 9613af24f3 Merge branch 'cassandra-3.11' into cassandra-4.0
* cassandra-3.11:
  Backport CASSANDRA-16418 to 3.x
2024-02-07 15:12:01 +01:00
Jacek Lewandowski 2170825f0e Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  Backport CASSANDRA-16418 to 3.x
2024-02-07 15:12:00 +01:00
Szymon Miężał 5be57829b0 Backport CASSANDRA-16418 to 3.x
When a node is decommissioned, it triggers data transfer to other nodes.
During this transfer process, receiving nodes temporarily hold token ranges in a pending state.
However, the current cleanup process doesn't account for these pending ranges when calculating token ownership,
leading to inadvertent cleanup of data already stored in SSTables.
To address this issue, this patch introduces two changes.
Firstly, it backports CASSANDRA-16418, introducing a preventive check in `StorageService#forceKeyspaceCleanup`.
This check disallows the initiation of cleanup when a node contains any pending ranges for the requested keyspace.
Secondly, it reintroduces a similar condition to test for the existence of pending ranges in `CompactionManager#performCleanup`.
This ensures the safety of this API as well.

Patch by Szymon Miezal; reviewed by Brandon Williams, Jacek Lewandowski for CASSANDRA-18824

Co-authored-by: Szymon Miezal <szymon.miezal@datastax.com>
Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
2024-02-07 15:11:59 +01:00
Ekaterina Dimitrova 1e8a1a21ab Fix data corruption in VectorCodec when using heap buffers
patch by Ekaterina Dimitrova, reviewed by Andres de la Pena for CASSANDRA-19168
2024-01-30 16:59:13 -05:00
Caleb Rackliffe 87f2a7b763 Avoid over-skipping of key iterators from static column indexes during mixed intersections
patch by Caleb Rackliffe; reviewed by Piotr Kołaczkowski and Alex Petrov for CASSANDRA-19278

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Piotr Kołaczkowski <pkolaczk@gmail.com>
2024-01-29 09:47:57 -06:00
Jacek Lewandowski d422eb1f35 Fix storage_compatibility_mode for streaming
- Rename and refactor a bit property for overriding storage compatibility mode
- Fix streaming for tools
- consider bulkloader as a client instead of tool

Patch by Jacek Lewandowski; reviewed by Berenguer Blasi, Branimir Lambov for CASSANDRA-19126
2024-01-23 14:24:06 +01:00
Szymon Miężał c76b32492f Add support of vector type to cqlsh COPY command
This patch adds a converter that allows parsing vector literals
passed via csv files to the COPY command.

patch by Szymon Miezal; reviewed by Andrés de la Peña, Stefan Miklosovic and Maxwell Guo for CASSANDRA-19118
2024-01-22 14:35:32 +00:00
Stefan Miklosovic 016dd6ca37
Make CQLSSTableWriter to support building of SAI indexes
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe, Doug Rohrer for CASSANDRA-18714
2024-01-22 09:59:19 +01:00
Bereng 666f7df803 Enhanced usage of test method names in CQLTester for better test debugging
patch by Berenguer Blasi, Benjamin Lerer; reviewed by Benjamin Lerer for CASSANDRA-19050

Co-authored-by: Benjamin Lerer <b.lerer@gmail.com>
Co-authored-by: Berenguer Blasi <berenguerblasi@gmail.com>
2024-01-18 07:06:18 +01:00
Stefan Miklosovic e077c93f0e
Merge branch 'cassandra-4.1' into cassandra-5.0 2024-01-11 11:32:41 +01:00
Stefan Miklosovic fa6e06c933
Merge branch 'cassandra-4.0' into cassandra-4.1 2024-01-11 11:30:25 +01:00
Runtian Liu ee9e418782
Skip version check if an endpoint is dead state in Gossiper#upgradeFromVersionSupplier
patch by Runtian Liu; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-19187
2024-01-11 10:37:11 +01:00
Ekaterina Dimitrova 50d0b2731b Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix flaky test org.apache.cassandra.tools.BulkLoaderTest.testBulkLoader_WithArgs1
2024-01-10 13:25:29 -05:00
Ekaterina Dimitrova dc6afb0cf3 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix flaky test org.apache.cassandra.tools.BulkLoaderTest.testBulkLoader_WithArgs1
2024-01-10 13:22:35 -05:00
Ekaterina Dimitrova 290a5990d4 Fix flaky test org.apache.cassandra.tools.BulkLoaderTest.testBulkLoader_WithArgs1
patch by Ekaterina Dimitrova; reviewed by Berenguer Blasi for CASSANDRA-19205
2024-01-10 13:12:00 -05:00
Paulo Motta e04a3176ff Merge branch 'cassandra-4.1' into cassandra-5.0
Closes #3004
2024-01-10 11:21:37 -05:00
Paulo Motta 3d1b981d89 Merge branch 'cassandra-4.0' into cassandra-4.1
Closes #2968
2024-01-10 11:18:34 -05:00
Isaac Reath 475c0035e6 [CASSANDRA-18999] Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
This commit fixes Gossiper::hasMajorVersion3Nodes so that it does not return true when all hosts have a known version, no hosts are on a version earlier than 4.0, and there is a 4.x minor version or patch version upgrade in progress. Additionally, this commit improves the clarity of Gossiper::hasMajorVersion3Nodes's name to indicate that it will return true when the cluster has 3.x nodes or if the cluster state is unknown, matching the description in the in-line comment.

patch by Isaac Reath; reviewed by Paulo Motta and Stefan Miklosovic for CASSANDRA-18999

Closes #2967
2024-01-10 11:14:49 -05:00
Caleb Rackliffe 14c773d8bc Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Revert unnecessary read lock acquisition when reading ring version in TokenMetadata introduced in CASSANDRA-16286
2024-01-09 15:05:25 -06:00
Caleb Rackliffe 4dd69dc62d Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Revert unnecessary read lock acquisition when reading ring version in TokenMetadata introduced in CASSANDRA-16286
2024-01-09 14:53:51 -06:00
Caleb Rackliffe d5cea135c9 Revert unnecessary read lock acquisition when reading ring version in TokenMetadata introduced in CASSANDRA-16286
patch by Caleb Rackliffe; reviewed by Francisco Guerrero for CASSANDRA-19107
2024-01-09 12:23:13 -06:00
Stefan Miklosovic ad642d5e25
Creating a SASI index after creating an SAI index does not break secondary index queries
patch by Stefan Miklosovic; reviewed by Caleb Rackliffe, Andres de la Peña for CASSANDRA-18939
2024-01-05 11:05:44 +01:00
Jacek Lewandowski 977f245906 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Memoize Cassandra verion and add a backoff interval for failed schema pulls
2023-12-22 11:49:20 +01:00
Jacek Lewandowski 3edca0041c Memoize Cassandra verion and add a backoff interval for failed schema pulls
Also, fixes MigrationCoordinatorTest and adds version assertions to Instance.startup

Patch by Jacek Lewandowski; reviewed by Ekaterina Dimitrova for CASSANDRA-18902
2023-12-22 11:49:19 +01:00
Jacek Lewandowski f0ea12c6d7 Add a startup check to fail startup when using invalid configuration with certain Kernel and FS type
Patch by Jacek Lewandowski; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-19196
2023-12-21 16:42:31 +01:00
Mike Adamson 3b05051f86 Simplify segment building in SAI to use single in-memory structure
This removes the RAMStringIndexer for literal indexes and replaces
  it with a SegmentTrieBuffer that replaces BlockBalancedTreeRamBuffer
  for literal and numeric indexes.

patch by Mike Adamson; reviewed by Andrés de la Peña, Caleb Rackliffe for CASSANDRA-18598
2023-12-20 15:14:41 +00:00
Claude Warren e6ffd8b4f7
UCS min_sstable_size should not be lower than target_sstable_size lower bound
patch by Claude Warren; reviewed by Ethan Brown, Branimir Lambov and Stefan Miklosovic for CASSANDRA-19112
2023-12-19 20:26:14 +01:00
Jacek Lewandowski 2fc2be54ca Fix the correspondingMessagingVersion of SSTable format and improve TTL overflow tests coverage
Patch by Jacek Lewandowski; reviewed by Berenguer Blasi for CASSANDRA-19197
2023-12-15 09:40:37 +01:00
Mike Adamson 6a7bef12ec
Fix SAI intersection queries
- Fix comparison in PostingListRangeIterator for updating skip token
 - Fix binary search in KeyLookup.clusteredSeekToKey
 - Added new on-disk component for storing partition sizes by partition ID

 patch by Mike Adamson; reviewed by Caleb Rackliffe, Mick Semb Wever for CASSANDRA-19011
2023-12-01 13:47:43 +01:00
Yifan Cai 9dc0378c2f Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-30 17:45:45 +08:00
Yifan Cai 350e968565 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-30 17:44:07 +08:00
Yifan Cai 50273d98e4 Support max SSTable size in sorted CQLSSTableWriter
patch by Yifan Cai; reviewed by Alex Petrov, Francisco Guerrero, Maxwell Guo for CASSANDRA-18941
2023-11-30 17:39:00 +08:00
Stefan Miklosovic bfd93eafdd
Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-29 17:48:36 +01:00
Stefan Miklosovic e8b638c2ae
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-29 17:47:18 +01:00
dmi0 0f2af6ab3f
Fix cassandra-stress in simplenative mode with prepared statements
patch by Dmitry Bychkov; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18744
2023-11-29 17:45:15 +01:00
Amit Pawar 3259bea533 Enable Direct-IO feature for CommitLog files using Java native API's.
Patch by Amit Pawar and Jacek Lewandowski; reviewed by Branimir Lambov and Maxwell Guo for CASSANDRA-18464

Co-authored-by: Amit Pawar <Amit.Pawar@amd.com>
Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
2023-11-29 11:29:23 +01:00
Mike Adamson a9e6ed3787
Fix broken indexing tests when using SAI
- This fixes a number of broken tests when the default index is set to SAI
 - Composite partition indexes were being filtered prior to row filtering in the
   index searcher resulting in incorrect results
 - Static and non-static index intersection was failing because static primary keys
   were not comparing correctly against non-static primary keys

 patch by Mike Adamson; reviewed by Andres de la Peña, Michael Semb Wever for CASSANDRA-19034
2023-11-26 12:27:23 +01:00
Mike Adamson 0e42b77c97
Improve code model around IndexContext
- Replace IndexContext with IndexTermType and IndexDefinition
 - Move index specific managers, factories and metrics to StorageAttachedIndex
 - Refactor Expression to explicitly define indexed and unindexed expressions

 patch by Mike Adamson; reviewed by Andres de la Peña, Caleb Rackliffe for CASSANDRA-18166
2023-11-25 09:53:40 +01:00
Ethan Brown 9c6e671434
Fixed bug where UnifiedCompactionTask constructor was calling the wrong base constructor of CompactionTask
patch by Ethan Brown; reviewed by Branimir Lambov, Stefan Miklosovic for CASSANDRA-18757
2023-11-23 16:19:10 +01:00
Andrés de la Peña c26f2a3d69 Fix SAI unindexed contexts not considering CONTAINS KEY
patch by Andrés de la Peña; reviewed by Maxwell Guo and Michael Semb Wever for CASSANDRA-19040
2023-11-23 11:51:52 +00:00
Ekaterina Dimitrova a2911c7391 Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-20 16:42:39 -05:00
Ekaterina Dimitrova 08d9b70b4d Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-20 16:34:51 -05:00
Ekaterina Dimitrova 55fecfb65e Fix BulkLoaderTest.testBulkLoader_WithArgs2
patch by Ekaterina Dimitrova; reviewed by Michael Semb Wever and Andres de la Pena for CASSANDRA-19000
2023-11-20 15:56:50 -05:00
Andrés de la Peña 91a242fe00 SAI in-memory index should check max term size
patch by Zhao Yang and Andrés de la Peña; reviewed by Zhao Yang for CASSANDRA-18926

Co-authored-by: Zhao Yang <zhaoyangsingapore@gmail.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2023-11-20 15:59:55 +00:00
Stefan Miklosovic 2004c17b60
Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-20 10:42:35 +01:00
Stefan Miklosovic 6a282b50b9
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-20 10:30:37 +01:00
Stefan Miklosovic 7fdb88d10a
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-11-20 10:29:09 +01:00
Stefan Miklosovic 13d44774a1
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-11-20 10:28:23 +01:00
Stefan Miklosovic 8c69f85502
ninja fix CASSANDRA-19002: Set gcgs in HintsMaker to Integer.MAX_VALUE
HintsMaker was creating hint files which ttl'ed after 10 days which started to fail the tests.
By setting it explicitly to Integer.MAX_VALUE, newly generated hint files will expire in cca 68 years.

Branches 3.0 to trunk introduce the fix to HintsMaker. Branches 5.0 and trunk contain regenerated hint files as well.
2023-11-20 10:26:59 +01:00
Bereng 6cac24f581 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Test failure: org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest
2023-11-20 07:36:52 +01:00
Bereng 3ba6de70c7 Test failure: org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest
patch by Berenguer Blasi; reviewed by Andres de la Peña for CASSANDRA-18948
2023-11-20 07:34:57 +01:00
Jacek Lewandowski b7b2aa5de5 Fix DiskSpaceMetricsTest.testFlushSize
Patch by Jacek Lewandowski; reviewed by Branimir Lambov for CASSANDRA-18710
2023-11-17 12:50:05 +01:00
Ethan Brown fb806d51e3
Add UCS sstable_growth and min_sstable_size options
patch by Ethan Brown; reviewed by Branimir Lambov, Stefan Miklosovic for CASSANDRA-18945
2023-11-14 21:41:07 +01:00
Jacek Lewandowski 4d61359c21 CASSANDRA-18785: Add support for Sonar analysis
Patch by Jacek Lewandowski; reviewed by Brandon Williams, Maxim Muzafarov, Michael Semb Wever, Stefan Miklosovic for CASSANDRA-18785
2023-11-13 14:48:28 +01:00
Bereng 0e4c2f4bef Default to nb instead of nc for sstable formats
patch by Berenguer Blasi; reviewed by Francisco Guerrero, Jacek Lewandowski, Michael Semb Wever for CASSANDRA-19010
2023-11-13 09:26:11 +01:00
Stefan Miklosovic a5299bb453
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-10 11:24:44 +01:00
Isaac Reath 26a7d574f0
Make StartupConnectivityChecker only run a connectivity check if there are no nodes which are running a version prior to Cassandra 4
patch by Isaac Reath; reviwed by Paulo Motta, Stefan Miklosovic for CASSANDRA-18968
2023-11-10 11:23:23 +01:00
Jacek Lewandowski 7a2bfdc56d Fix incorrect seeking through the sstable iterator by IndexState
Patch by Jacek Lewandowski; reviewed by Alex Petrov and Maxim Muzafarov for CASSANDRA-18932
2023-11-09 16:08:59 +01:00
Stefan Miklosovic 5b3c36b28a
Merge branch 'cassandra-4.1' into cassandra-5.0 2023-11-08 14:29:48 +01:00
Stefan Miklosovic 48eaf0a718
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-11-08 14:21:06 +01:00
Stefan Miklosovic ac8a8687a3
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-11-08 14:17:42 +01:00
Stefan Miklosovic 997ad8e03b
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-11-08 14:14:58 +01:00
Stefan Miklosovic 359700dde2
Create / update tests to ensure commit logs and hints for all versions in MessagingService are ingestible by 5.0
Patches for 3.0, 3.11, 4.0 and 4.1 are just adding HintsMaker class to generate hint files.
Patches for 5.0 and trunk are adding tests for commit log upgrading and hints which were generated by HintsMaker.

Patches for 5.0 and trunk are also adding version 1 in HintsDescriptor back as it was removed in CASSANDRA-18314 by mistake.

patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-19002
2023-11-08 14:07:26 +01:00
Jacek Lewandowski 9dbd63a5b9 Fix KeyCacheTest for cases when early open is disabled
Patch by Jacek Lewandowski; reviewed by Berenguer Blasi, Branimir Lambov, Caleb Rackliffe for CASSANDRA-18911
2023-11-08 09:28:23 +01:00
David Capwell dca76145c2 Add retries to IR messages
patch by David Capwell; reviewed by Blake Eggleston for CASSANDRA-18962
2023-11-01 15:12:49 -07:00
Jacek Lewandowski f2c46cbf3b Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Retrieve keyspaces metadata and schema version concistently in DescribeStatement
2023-10-31 11:15:45 +01:00
Jacek Lewandowski 9ad5ec9664 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Retrieve keyspaces metadata and schema version concistently in DescribeStatement
2023-10-31 11:15:44 +01:00
Jacek Lewandowski 86e07595f7 Retrieve keyspaces metadata and schema version concistently in DescribeStatement
The fix makes the DescribeStatement to wait for the in-progress schema transformations to finish before returning the first page. This way, the metadata and schema version encoded in the result set metadata are guaranteed to be consistent.

Patch by Jacek Lewandowski; reviewed by Benjamin Lerer, Ekaterina Dimitrova for CASSANDRA-18921
2023-10-31 11:15:43 +01:00
David Capwell 69f5df0b00 Add metrics and logging to repair retries
patch by David Capwell; reviewed by Caleb Rackliffe, Maxim Muzafarov for CASSANDRA-18952
2023-10-30 14:47:26 -07:00
Stefan Miklosovic 4ecff92404
Remove deprecated code in Cassandra 1.x and 2.x
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18959
2023-10-30 21:54:55 +01:00
Caleb Rackliffe 256e39fc62 ClientRequestSize metrics should not treat CONTAINS restrictions as being equality-based
patch by Caleb Rackliffe; reviewed by Benjamin Lerer for CASSANDRA-18896
2023-10-30 14:18:52 -05:00
Mike Adamson c4d11c4372 Fix VectorUpdateDeleteTest for JDK 17
Removed use of reflection and directly set
  relevant property to avoid jdk 17 errors

patch by Mike Adamson; reviewed by Stefan Miklosovic, Michael Semb Wever and Andrés de la Peña for CASSANDRA-18715
2023-10-30 18:57:54 +00:00
Mike Adamson 949b760f55
Add support for a vector search index in SAI
- Adds jbellis/jvector (1.0.2) library for DiskANN based indexes on floating point vectors
- Adds ORDER BY ANN OF capability to do ANN search and order the results by score

 patch by Mike Adamson; reviewed by Andrés de la Peña, Jonathon Ellis for CASSANDRA-18715

Co-authored-by Jonathon Ellis jbellis@gmail.com
Co-authored-by Zhao Yang zhaoyangsingapore@gmail.com
2023-10-29 12:24:00 +01:00
Stefan Miklosovic b59b832eba
Remove crc_check_chance from CompressionParams
patch by Stefan Miklosovic; reviewed by Maxwell Guo, Jacek Lewandowski, Branimir Lambov for CASSANDRA-18872
2023-10-26 22:38:21 +02:00
Aleksey Yeschenko 7d54a62ccc Fix schema loading of UDTs inside vectors inside UDTs
patch by Aleksey Yeschenko; reviewed by Marcus Eriksson for
CASSANDRA-18964
2023-10-26 17:44:10 +01:00
maxwellguo 0c7410a9da
Fix nodetool tablehistograms output to avoid printing repeated information and ensure at most two arguments
patch by Maxwell Guo; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-18955
2023-10-25 08:38:13 +02:00
Maxim Muzafarov 07df26778b Change the checksum algorithm SAI-related files use from CRC32 to CRC32C
patch by Maxim Muzafarov; reviewed by Caleb Rackliffe and Zhao Yang for CASSANDRA-18836
2023-10-20 14:46:49 -05:00
Jacek Lewandowski 57f494d8d4 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fixed the inconsistency between distributedKeyspaces and distributedAndLocalKeyspaces
2023-10-19 12:56:10 +02:00
Jacek Lewandowski ac71d0f56e Fixed the inconsistency between distributedKeyspaces and distributedAndLocalKeyspaces
Patch by Jacek Lewandowski; reviewed by Benjamin Lerer, Berenguer Blasi, Ekaterina Dimitrova, Jeremiah Jordan for CASSANDRA-18747
2023-10-19 12:56:09 +02:00
Mike Adamson e45c1092f9 Correctly remove Index.Group from IndexRegistry
The Index.Group was being left in the list indexGroups in the SecondaryIndexManager because the incorrect
key was being used to remove it from the map

patch by Mike Adamson; reviewed by Caleb Rackliffe and Zhao Yang for CASSANDRA-18905

Co-authored-by: Zhao Yang <zhaoyangsingapore@gmail.com>
2023-10-18 13:43:41 -05:00
Stefan Miklosovic 269285213d
Add versions into Deprecated annotation
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov, Brandon Williams for CASSANDRA-18912

Co-authored-by: Maxim Muzafarov <maxmuzaf@gmail.com>
2023-10-18 19:54:10 +02:00
Mick Semb Wever 987d03c142
Fixes for in-tree scripts: offline mode, maybe-build for fqltool-test, jvm-dtest-upgrade
- jvm-dtest-upgrade script running in ci-cassandra.a.o (needs default bash)
 - add offline mode (to avoid `git fetch` before building dtest-jars on other branches),
 - avoid rebuilding in fqltool-test target, as is standard for test targets.
 - python detection and override
 - FileTest cleanup (tmp directory was left unreadable and undeletable)
 - reuse ~/.ccm (like normal)
 - remove support for python 3.6
 - remove docker volumes in image (they are added at run time)
 - remove superfluousjava version debug
 – extra mount for build/tmp as hack to prevent buggy hardlinks on overlay

 patch by Mick Semb Wever; reviewed by Brandon Williams, Ekaterina Dimitrova, Josh McKenzie, Maxim Muzafarov for CASSANDRA-18665
2023-10-16 16:01:28 +02:00
Bereng 25da086336 Test failure: org.apache.cassandra.tools.nodetool.ForceCompactionTest.forceCompactMultipleRowsTombstoneTest-.jdk11
patch by Berenguer Blasi; reviewed by Brandon Williams for CASSANDRA-18881
2023-10-16 12:23:00 +02:00
Andrés de la Peña 3b9881bfa6 Fix vector type to support DDM's mask_default function
patch by Andrés de la Peña; reviewed by Berenguer Blasi and Maxwell Guo for CASSANDRA-18889
2023-10-10 15:01:11 +01:00
Alex Petrov 8b941a6bdc Merge branch 'cassandra-4.1' into cassandra-5.0 2023-10-10 10:50:08 +02:00
Alex Petrov e562d6a3a9 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-10-10 10:49:41 +02:00
Francisco Guerrero 26c374da4f Synchronize CQLSSTableWriter#build on the Schema.instance object
In this commit the `org.apache.cassandra.io.sstable.CQLSSTableWriter#build` method synchronizes on the
`Schema.instance` object (instead of the `CQLSSTableWriter.class`) to prevent concurrent schema operations
to fail when the offline tools also updates the schema.

For example, a table creation operation, which modifies the keyspace tables metadata, might end up
missing the update when a concurrent call to the `CQLSSTableWriter#build` method is accessing the
singleton Schema instance.

Patch by Francisco Guerrero, reviewed by Yifan Cai, Maxwell Guo, Alex Petrov for CASSANDRA-18317.
2023-10-10 10:46:47 +02:00
Jacek Lewandowski 7e65d04e9c Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Fix CQLConnectionTest and SimpleClient
2023-10-04 18:45:54 +02:00
Jacek Lewandowski 29c3136763 Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Fix CQLConnectionTest and SimpleClient
2023-10-04 18:45:52 +02:00
Jacek Lewandowski 8486d678b0 Fix CQLConnectionTest and SimpleClient
There are a couple of fixes in this patch. As explained on the ticket, some of the flaky failures are a race of two events that cause the termination of the connection. First is a legitimate close as a result of expected failures. In this case, the server sends the error message and closes the connection. The test expects to receive that message. However, the test was sending more messages that couldn't be received because the server already closed the connection, and they were bounced by the OS, causing immediate connection shutdown on the client side, even before it could receive the error message.

The fix is to stop sending the messages after sending the message, which is expected to cause a failure. Some other accompanying modifications include using Awaitility to wait for specific events and consider the configured maximum number of consecutive failures.

Also added some more logging to help investigate failures in the future.

Patch by Jacek Lewandowski; reviewed by Sam Tunnicliffe for CASSANDRA-16949
2023-10-04 18:45:50 +02:00
Andrés de la Peña 6befb178aa Remove support for empty values on the vector data type
patch by Andrés de la Peña; reviewed by David Capwell and Maxwell Guo for CASSANDRA-18876
2023-10-04 17:31:28 +01:00
Maxim Muzafarov f51d9ecbe3
Upgrade Dropwizard Metrics to 4.2.19
patch by Maxim Muzafarov; reviewed by Ekaterina Dimitrova and Stefan Miklosovic for CASSANDRA-14667
2023-10-04 13:41:47 +02:00
Ekaterina Dimitrova eb30005251 Upgrade caffeine cache and fix CIDR permissions cache invalidation
patch by Ekaterina Dimitrova; reviewed by Jacek Lewandowski, Ben Manes, Yifan Cai, Shailaja Koppu for CASSANDRA-18805
2023-10-03 16:14:34 -04:00
David Capwell d828cd0228 Test failure: org.apache.cassandra.repair.ConcurrentIrWithPreviewFuzzTest
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-18890
2023-10-03 09:48:12 -07:00
Stefan Miklosovic b9f614f7e5
Remove deprecated properties in CompressionParams
This patch removes deprecated chunk_length_kb and sstable_compression in favor of
chunk_length_in_kb and class parameters.

The only deprecated compression parameter left, crc_check_chance (which is configurable outside
of compression parameters as a standalone table parameter) is meant to be treated separately.

patch by Stefan Miklosovic; reviewed by Maxim Muzafarov and Brandon Williams for CASSANDRA-18742
2023-09-29 15:19:12 +02:00
Jacek Lewandowski 6de90bf75c Fix LongCompactionTest
Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-18884
2023-09-28 08:01:12 +02:00
David Capwell 164fa7949d Add support for repair coordinator to retry messages that timeout
patch by David Capwell; reviewed by Caleb Rackliffe, Marcus Eriksson for CASSANDRA-18816
2023-09-27 16:21:36 -07:00
Jon Meredith a4be70930f Merge branch 'cassandra-4.1' into cassandra-5.0 2023-09-25 14:26:14 -06:00
Jon Meredith b9586501a6 Internode legacy SSL storage port certificate is not hot reloaded on update
patch by Jon Meredith; reviewed by Dinesh Joshi, Francisco Guerrero for CASSANDRA-18681
2023-09-25 14:25:14 -06:00
Jacek Lewandowski d16e8d3653 Do not create sstable files before registering in txn
Refactoring prevents the situation where some sstable components, like
data or index, are created before the new sstable is registered with
lifecycle transaction, which leads to a problem such that there is
a short time when incomplete sstable components are present. At the same
time, no transaction file is created, which leads to the possibility
that the sstable can be recognized as completed by various
transaction-aware listers.

Patch by Jacek Lewandowski; reviewed by Branimir Lambov, Mike Adamson for CASSANDRA-18737
2023-09-25 18:47:56 +02:00
Branimir Lambov a23f4c0b15 Merge branch 'cassandra-4.1' into cassandra-5.0 2023-09-21 17:01:16 +03:00
Branimir Lambov db6641fbb6 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-09-21 16:59:04 +03:00
Branimir Lambov c6385ac3dd Merge branch 'cassandra-3.11' into cassandra-4.0 2023-09-21 16:02:01 +03:00
Ethan Brown 87c2af85c1 Fix delayed SSTable release with unsafe_aggressive_sstable_expiration
patch by Ethan Brown; reviewed by Branimir Lambov and Mick Semb Wever for CASSANDRA-18756
2023-09-21 15:53:27 +03:00
Jacek Lewandowski 15f355a006 Remove wrong assertion in SSTableLoader
Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-18840
2023-09-15 09:07:45 +02:00
Brandon Williams 00c0cbb958 Merge branch 'cassandra-4.1' into cassandra-5.0 2023-09-12 06:13:44 -05:00
Brandon Williams 3d220b5a6e Merge branch 'cassandra-4.0' into cassandra-4.1 2023-09-12 06:13:00 -05:00
Brandon Williams b2093ef321 Select automatic native port when starting the server in CQLTester
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-18829
2023-09-12 06:11:44 -05:00
Jacek Lewandowski 30d540d797 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Set the delay to 0 for unit tests and fix GuardrailDiskUsageTest
  Nodetool paxos-only repair is no longer incremental
2023-09-12 11:07:09 +02:00
Jacek Lewandowski b053027680 Set the delay to 0 for unit tests and fix GuardrailDiskUsageTest
Patch by Jacek Lewandowski; reviewed by Berenguer Blasi and Jeremiah Jordan for CASSANDRA-18821

# Conflicts:
#	test/distributed/org/apache/cassandra/distributed/test/ColumnMaskTest.java
#	test/unit/org/apache/cassandra/cql3/CQLTester.java
2023-09-12 11:07:08 +02:00
Brandon Williams 4093be5295 Nodetool paxos-only repair is no longer incremental
Patch by Ningzi Zhan; reviewed by brandonwilliams, jlewandowski, and
Maxwell Guo for CASSANDRA-18466
2023-09-08 09:07:34 -05:00
Brandon Williams 725655dda2 Nodetool paxos-only repair is no longer incremental
Patch by Ningzi Zhan; reviewed by brandonwilliams, jlewandowski, and
Maxwell Guo for CASSANDRA-18466
2023-09-08 09:05:07 -05:00
Mike Adamson 9ce86e0ff8 SAI result retriever is filtering too many rows
This patch fixes a bug in the SegmentMetadata that
was only storing the partition key for min and max
primary keys for a segment. It also contains some
refactoring of the PrimaryKey to remove the deferred
loading of PrimaryKeys by the PrimaryKeyMaps.

Patch by Mike Adamson; reviewed by Caleb Rackliffe and Andrés de la Peña for CASSANDRA-18734
2023-09-07 11:50:08 +01:00
Bereng 52a8d2947a Flaky test: org.apache.cassandra.cql3.validation.operations.InsertUpdateIfConditionTest
patch by Berenguer Blasi; reviewed by Andres de la Peña for CASSANDRA-18393
2023-09-04 09:20:34 +02:00
Jon Meredith 24cfe27ea5 Merge branch 'cassandra-4.1' into cassandra-5.0 2023-08-28 15:37:25 -06:00
Jon Meredith 251ae80bb0 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-08-28 15:34:34 -06:00
Francisco Guerrero 6ffa43f68b Support Dynamic Port Allocation for in-jvm dtest framework
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Jon Meredith, Yifan Cai for CASSANDRA-18722
2023-08-28 15:29:14 -06:00
Brandon Williams b670b7b0c8 Merge branch 'cassandra-4.1' into cassandra-5.0 2023-08-28 09:48:18 -05:00
Derek Chen-Becker 5e2985f10e Ensure unit tests honor tmp.dir
Modify unit tests so that any files created are rooted in the directory
specified by the "tmp.dir" Ant property. Ant already passes the value of
tmp.dir to the JVM's java.io.tmpdir parameter, so the primary changes are
to make use of Files.createTempDirectory to generate per-test work
directories. Also update the test checkstyle rules to catch any future
usage of hardcoded "/tmp".

Patch by Derek Chen-Becker; reviewed by bereng and brandonwilliams for CASSANDRA-18750
2023-08-28 09:47:13 -05:00
Brandon Williams c611632eb5 SamplingManager samples before cancelling.
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-18065
2023-08-28 06:14:29 -05:00
Stefan Miklosovic a9606c6f4b
Merge branch 'cassandra-4.1' into cassandra-5.0 2023-08-28 09:58:41 +02:00