Commit Graph

13121 Commits

Author SHA1 Message Date
Ekaterina Dimitrova b47179b7d4
Add option to disable cqlsh history
We can disable saving of the history either via command-line parameter --disable-history, or by setting disabled = True in the history section of the cqlshrc. Both options will read existing history, and just won't save new commands.

Update help and docs for cqlsh history.
Add startup info logline whenr history logging is enabled.
Add a fix for cqlshrc file path not correctly expanding.

Includes the Backport of
  Allows users to change cqlsh history location using env variable
  patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17448

patch by Ekaterina Dimitrova; reviewed by Mick Semb Wever for CASSANDRA-XXX

Co-authored-by: Alex Ott alex.ott@datastax.com
Co-authored-by: Jaroslaw Grabowski jaroslaw.grabowski@datastax.com
2026-03-17 23:01:57 +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 3ad4794aa0
Node does not send multiple inflight echos
patch by Cameron Zemek; reviewed by Stefan Miklosovic, Brandon Williams for CASSANDRA-18866
2026-03-15 18:31:14 +01:00
MichaelMorris 9c640a06eb
ninja CHANGES.txt entry for CASSANDRA-21052 2026-03-10 20:04:33 +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
Abe Ratnofsky ec3b425c38 Switch lz4-java to at.yawk.lz4 version due to CVE
Patch by Abe Ratnofsky; reviewed by Jyothsna Konisa, Dmitry Konstantinov for CASSANDRA-21052
2025-12-18 10:51:26 -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
Stefan Miklosovic 34c3736c9e
Backport fix to nodetool gcstats output for direct memory
patch by Stefan Miklosovic; reviewed by Brad Schoening for CASSANDRA-21037
2025-12-10 11:21:16 +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
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
Stefan Miklosovic d966547d01
update shaded cassandra-driver-core to 3.11.5
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20904
2025-09-19 14:12:00 +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 f9dbfd431e
Update Jackson to 2.19.2
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20848
2025-08-25 17:34:38 +02:00
Stefan Miklosovic a64a64b915
Update commons-lang3 to 3.18.0
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-20849
2025-08-25 17:21:19 +02:00
Andy Tolbert 411187f129 Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean
Adds setNativeTransportMaxConcurrentConnectionsPerIp and
getNativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean so
these methods can be used from JMX like the
*NativeTransportMaxConcurrentConnections methods.

patch by Andy Tolbert; reviewed by Chris Lohfink for CASSANDRA-20642
2025-08-20 17:46:15 -05: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
Brandon Williams 43746c13c2 Use MAX_PARALLEL_TRANSFERS instead of default
Patch by brandonwilliams, reviewed by mck for CASSANDRA-20532
2025-05-09 06:10:46 -05: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
Caleb Rackliffe 78290bed45 Avoid computing prepared statement size for unprepared batches
patch by Caleb Rackliffe; reviewed by Berenguer Blasi and Marcus Eriksson for CASSANDRA-20556
2025-04-15 22:48:10 -05: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
Doug Rohrer 51cf55747b
Update OWASP dependency checker to version 12.1.0
patch by Doug Rohrer; reviewed by Stefan Miklosovic for CASSANDRA-20501
2025-04-03 09:16:06 +02:00
Stefan Miklosovic 73f0e2e401
Suppress CVE-2025-25193
patch by Stefan Miklosovic; reviewed by Michael Semb Wever, Brandon Williams for CASSANDRA-20504
2025-04-02 11:52:11 +02:00
Mick Semb Wever 9abed87ba4
Autogenerate toplevel .snyk file from owasp suppressions
patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-20319
2025-03-30 09:27:39 +02:00
Stefan Miklosovic a16333387c
Update zstd-jni to 1.5.7-2
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov for CASSANDRA-20453
2025-03-19 12:24:33 +01:00
Brandon Williams 763994ba43 Update changes for 20408/20412 2025-03-11 15:14:15 -05: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
Stefan Miklosovic 8ca0af32f3
Merge branch 'cassandra-3.11' into cassandra-4.0 2025-02-07 12:45:03 +01:00
Stefan Miklosovic ed3f1af723
Merge branch 'cassandra-3.0' into cassandra-3.11 2025-02-07 12:43:10 +01:00
Stefan Miklosovic f340514bbe
Increment version 2025-02-07 12:40:54 +01:00
Brandon Williams b6baa8bde3 Ninja fix ticket number in changes 2025-02-06 06:05:44 -06: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
Francisco Guerrero bf6fcf84ae
Merge branch 'cassandra-3.0' into cassandra-3.11
* cassandra-3.0:
  Minimize expensive reads during authz flow in 3.0/3.11
2025-02-05 15:14:04 -08:00
Sam Tunnicliffe 0b6ae2673e
Minimize expensive reads during authz flow in 3.0/3.11
Patch by Sam Tunnicliffe; reviewed by Francisco Guerrero for CASSANDRA-20293
2025-02-05 14:25:19 -08:00
Francisco Guerrero 4f9e474bb1
Fix autocompletion for role names/user names
patch by Francisco Guerrero; reviewed by Stefan Miklosovic, Bernardo Botella for CASSANDRA-20175
2025-02-04 10:44:12 +01:00
Stefan Miklosovic 8e28dd0c17
Merge branch 'cassandra-3.11' into cassandra-4.0 2025-02-04 09:54:09 +01:00
Stefan Miklosovic 82e2c7d991
Merge branch 'cassandra-3.0' into cassandra-3.11 2025-02-04 09:50:02 +01:00
Stefan Miklosovic 7c147ef80e
Increment version 2025-02-04 09:46:26 +01: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