Commit Graph

7085 Commits

Author SHA1 Message Date
mck 2ce273a118
ninjafix – CassandraRoleManagerTest (CASSANDRA-21202) 2026-03-17 22:07:03 +01:00
mck 17c573f800
Rate limit password changes
Introduces property cassandra.role_password_update_interval_in_ms, with default value of 5000.
Logging added when passwords on roles are changed or are rate-limited.

 patch by Mick Semb Wever; reviewed by Doug Rohrer, Jeremiah Jordan for CASSANDRA-21202
2026-03-16 22:02:41 +01:00
Stefan Miklosovic 547187a229
Obsolete expired SSTables before compaction starts
patch by Stefan Miklosovic; reviewed by Branimir Lambov for CASSANDRA-19776
2026-03-05 16:03:13 +01:00
jaydeepkumar1984 077b7ebe22 No need to evict already prepared statements, as it creates a race condition between multiple threads
patch by Jaydeepkumar Chovatia; reviewed by Alex Petrov for CASSANDRA-17401
2026-02-10 16:53:19 -08:00
Mikołaj Diakowski 4c33f1f2d7
Restrict BytesType compatibility to scalar types only
Converting collections or UDTs to raw bytes is nonsensical - it
allows reading raw serialized bytes which have no meaningful
interpretation.

patch by Mikołaj Diakowski; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-20982
2025-12-11 10:53:29 +01:00
Marcus Eriksson 76a7e43613 ArrayIndexOutOfBoundsException with repaired data tracking and counters
Patch by marcuse; reviewed by Sam Tunnicliffe for CASSANDRA-20871
2025-12-05 12:55:59 +01:00
Dmitry Konstantinov 8d2c11ed2e Fix cleanup of old incremental repair sessions in case of owned token range changes or a table deleting
Patch by Dmitry Konstantinov; reviewed by Marcus Eriksson, Jaydeepkumar Chovatia for CASSANDRA-20877
2025-11-22 11:17:35 +00:00
Dmitry Konstantinov 3f079b2345 Fix memory leak in BufferPoolAllocator when a capacity needs to be extended
Before the fix during a capacity extension BufferPoolAllocator returned to BufferPool a sliced ByteBuffer wrapper object instead of the originally allocated one, so the ByteBuffer was not recycled by BufferPool
Adjust BufferPoolAllocatorTest to test the ByteBuf capacity extension with a real BufferPool behavior

Patch by Dmitry Konstantinov; reviewed by Michael Semb Wever for CASSANDRA-20753
2025-11-14 17:11:25 +00:00
Nikhil Kumawat 61014f2ae7 Leveled Compaction doesn't validate maxBytesForLevel when the table is altered/created
patch by Nikhil Kumawat, Nikhil; reviewed by David Capwell, guo Maxwell for CASSANDRA-20570
2025-11-07 11:44:12 -08:00
Ruslan Fomkin 2d7e99f7b9
Document new table name length limit
CASSANDRA-20389 implemented limit on table name length of 222
characters. This commit updates the documentation to reflect this.

It also adds an assert in CreateTableValidationTest to ensure that the
documented limit matches the actual constant.

patch by Ruslan Fomkin; reviewed by Brad Schoening, Dmitry Konstantinov for CASSANDRA-20914
2025-11-07 13:54:03 +01:00
Doug Rohrer aa0e2f1631 CASSANDRA-20884 - Move JMX classes to the in-jvm-dtest API project
patch by Doug Rohrer; reviewed by Francisco Guerrero and Bernardo Botella Corbi for CASSANDRA-20884
2025-10-24 13:37:08 -04:00
Yifan Cai 90f231ad56
Fixed incorrect error message constant for keyspace name length validation
patch by Yifan Cai; reviewed by Maxwell Guo, Stefan Miklosovic for CASSANDRA-20915
2025-09-24 10:13:04 +02:00
Ruslan Fomkin 6c29686ea7 Prevent too long table names not fitting file names
The length of table names was not controlled. This is likely due to
confusion between validation methods with similar names. As result
creating tables with too long names led to the too long file name
exceptions during table creations.

This commit adds a validation of table name lengths to avoid the too
long file name errors. The validation length is based on how the table
name is used to create file/directory names, and needs to be exact to
prevent the too long file name exception, but allow all other table
names, which didn't lead to the too long file name exception. This
length limit is different from the existing name length limit of 48
characters used by common validation functions.

Thus, this commit moves out the length validation from the validation
methods into a separate length validation method, so the errors on
names are more specific. The non-length validation methods combined
into a single method, which checks for empty names and valid characters.

New constants are added for the length limits.

Table name related code are moved into methods in TableMetadata class,
so their semantics are more clear and to allow reuse, e.g., in
asserting the table name length constant.
Tests are added for the long table names and non-alphanumeric names.

Keyspace name validation function is now shared between two classes and
a unit test of it is added.

Patch by Ruslan Fomkin; reviewed by Piotr Kołaczkowski, Dmitry
Konstantinov, Maxwell Guo for CASSANDRA-20389
2025-09-10 22:48:43 +01:00
Dmitry Konstantinov 1c5286f4d1
Fix IndexOutOfBoundsException in sstablemetadata tool when a range tombstone is a max clustering value
patch by Dmitry Konstantinov; reviewed by Stefan Miklosovic for CASSANDRA-20855
2025-08-27 18:54:10 +02:00
Stefan Miklosovic eb9586dc68
Make secondary index implementations notified about rows in fully expired SSTables in compaction
patch by Stefan Miklosovic; reviewed by Branimir Lambov for CASSANDRA-20829
2025-08-20 10:42:01 +02:00
Andy Tolbert d077f69553 Ensure prepared_statement INSERT timestamp precedes eviction DELETE
Updates SystemKeyspace.writePreparedStatement to accept a timestamp
associated with the Prepared creation time. Using this timestamp
will ensure that an INSERT into system.prepared_statements will
always precede the timestamp for the same Prepared in
SystemKeyspace.removePreparedStatement.

This is needed because Caffeine 2.9.2 may evict an entry as soon
as it is inserted if the maximum weight of the cache is exceeded
causing the DELETE to be executed before the INSERT.

Additionally, any clusters currently experiencing a leaky
system.prepared_statements table from this bug may struggle to
bounce into a version with this fix as
SystemKeyspace.loadPreparedPreparedStatements currently does
not paginate the query to system.prepared_statements, causing heap
OOMs.  To fix this this patch adds pagination at 5000 rows and
aborts loading once the cache size is loaded. This should allow
nodes to come up and delete older prepared statements that may no
longer be used as the cache fills up (which should happen immediately).

This patch does not address the issue of Caffeine immediately evicting
a prepared statement, however it will prevent the
system.prepared_statements table from growing unbounded.  For most users
this should be adequate, as the cache should only be filled when there
are erroneously many unique prepared statements. In such a case we can
expect that clients will constantly prepare statements regardless
of whether or not the cache is evicting statements.

patch by Andy Tolbert; reviewed by Berenguer Blasi and Caleb Rackliffe for CASSANDRA-19703
2025-05-27 22:17:15 -05:00
David Capwell c736d22cf8 Gossip doesn't converge due to race condition when updating EndpointStates multiple fields
patch by David Capwell, Matt Byrd; reviewed by Blake Eggleston, Brandon Williams for CASSANDRA-20659
2025-05-22 14:12:15 -07:00
Josh McKenzie f2e3a0a4fc Handle sstable metadata stats file getting a new mtime after compaction has finished
Patch by Josh McKenzie and marcuse; reviewed by Josh McKenzie and marcuse for CASSANDRA-18119
2025-05-12 13:16:50 +02:00
Jon Meredith d4d858d382 Updating a column with a new TTL but same expiration time is non-deterministic and causes repair mismatches.
patch by Jon Meredith; reviewed by Marcus Eriksson for CASSANDRA-20561
2025-04-22 14:42:02 -06:00
Tibor Répási 348ffb0ba0 allow grant permission on virtual keyspaces
Patch by Tibor Répási; reviewed by Francisco Guerrero, Maxwell Guo for CASSANDRA-20171
2025-04-18 09:13:04 -07:00
Bereng fcea0b6fd8 CASSANDRA-19633 Replaced node is stuck in a loop calculating ranges 2025-04-14 09:20:33 +02:00
Ariel Weisberg 96bfbe6250 Dropwizard Meter causes timeouts when infrequently used
patch by Ariel Weisberg; reviewed by Maxim Muzafarov for CASSANDRA-19332
2025-04-08 15:16:08 -04:00
Dmitry Konstantinov bc8941e377 Fix CommitlogShutdownTest flakiness by testing a real drain logic instead an emulation which is affected by background activities for system tables
Patch by Dmitry Konstantinov; reviewed by Josh McKenzie for CASSANDRA-19101
2025-03-27 12:19:55 +00:00
Dmitry Konstantinov 8cb58bf97a Disable role and network permission caches to avoid interference between test methods
Patch by Dmitry Konstantinov; reviewed by TBD for CASSANDRA-20423
2025-03-13 13:37:20 +00:00
Caleb Rackliffe f375a3914f Support null column value tombstones in FQL batch statements
patch by Caleb Rackliffe; reviewed by Abe Ratnofsky for CASSANDRA-20397
2025-03-06 10:56:49 -06:00
Stefan Miklosovic ef354d0d5e
Update Zstd library to 1.5.7-1
patch by Stefan Miklosovic; reviewed by Yifan Cai for CASSANDRA-20367
2025-03-06 14:19:01 +01:00
Bereng 914046ae46 Long running repairs autofail prematurely
patch by Berenguer Blasi; reviewed by Bernardo Botella Corbi, Michael Semb Wever for CASSANDRA-20312
2025-02-12 11:09:14 +01:00
Sam Tunnicliffe 066c489d76 Tighten up permissions on system keyspaces
* Restrict which permissions can be granted on system keyspaces
* Ensure that GRANT... ON ALL KEYSPACES excludes system keyspaces
* Add system_traces to the always readable set

Patch by Sam Tunnicliffe and Francisco Guerrero; reviewed by Sam
Tunnicliffe and Francisco Guerrero for CASSANDRA-20090

Note: this is a re-application of the commit to cassandra-4.0 only,
to fix a bad merge the first time around.

Co-authored-by: Francisco Guerrero <frankgh@apache.org>
2025-02-06 09:13:03 +00:00
Stefan Miklosovic 6207a305ba
Tighten up permissions in dc authorizers
patch by Stefan Miklosovic; reviewed by Francisco Guerrero for CASSANDRA-20225
2025-01-26 17:52:09 +01:00
David Capwell 3ddccf4521 CBUtil serialization of UTF8 does not handle all UTF8 properly
patch by David Capwell; reviewed by Yifan Cai for CASSANDRA-20234
2025-01-24 14:56:44 -08:00
Matt Byrd 4f0ad22f12 Use mutation creation time for hint expiry rather than hint submission time
patch by Matt Byrd; reviewed by Chris Lohfink, reviewed by Blake Eggleston for CASSANDRA-20014
2025-01-21 12:05:00 -08:00
Kristijonas Zalys 7ffbd714b4 Set setIsShutdownUnsafeForTests(true) in dtests to fix shutdown race condition
Patch by Kristijonas Zalys, reviewed by brandonwilliams and mck for
CASSANDRA-18440
2025-01-16 13:52:51 -06:00
Brandon Williams b074675c37 Add in-jvm dtest for durable writes
Patch by brandonwilliams; reviewed by smiklosovic for CASSANDRA-19601
2025-01-08 13:40:02 -06:00
Sunil Ramchandra Pawar 4fc8bb29fc IndexOutOfBoundsException when accessing partition where the column was deleted
patch by Sunil Ramchandra Pawar; reviewed by Caleb Rackliffe, David Capwell for CASSANDRA-20108
2025-01-07 17:38:20 -08:00
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
Runtian Liu 426eebb513
A node should always return back the full information about itself for gossip regardless the asked heartbeat version
patch by Runtian Liu; reviewed by Brandon Williams, Michael Semb Wever for CASSANDRA-19983
2024-11-19 00:23:45 +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 7ba691e3d3 Flaky PstmtPersistenceTest
patch by Berenguer Blasi; reviewed by Stefan Miklosovic for CASSANDRA-20055
2024-11-11 09:43:31 +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 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 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
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
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
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
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 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 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 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
Benedict Elliott Smith 2842c01ce7 Fix BTree.FastBuilder.reset() and test
Patch by benedict; reviewed by blambov for CASSANDRA-19785
2024-09-16 12:24:32 -05: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