Commit Graph

31353 Commits

Author SHA1 Message Date
Benedict Elliott Smith c7de33c597 Strict Serializability Verifier may incorrectly handle blind writes when witnessed before the writing operation ACKs
patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20905
2025-09-17 21:24:37 +01:00
jaydeepkumar1984 bf2c1c124e Improved observability in AutoRepair to report both expected vs. actual repair bytes and expected vs. actual keyspaces
patch by Jaydeepkumar Chovatia; reviewed by Chris Lohfink for CASSANDRA-20581
2025-09-16 20:38:39 -07:00
Ariel Weisberg d7a46b52ef Deterministic Simulator thread ids
Also: Don't ignore self reconcile test

patch by Ariel Weisberg; reviewed by David Capwell for CASSANDRA-20841
2025-09-15 16:44:00 +01:00
Maxwell Guo dddbe1ad87 Execution of CreateTriggerStatement should not rely on external state
patch by Maxwell Guo; reviewed by Sam Tunnicliffe for CASSANDRA-20287
2025-09-15 17:49:05 +08:00
Benedict Elliott Smith ded7a597b5 ninja: remove accord invariant that can break startup 2025-09-12 18:24:56 +01:00
Pranav Shenoy cf806cac1a Support LIKE expressions in filtering queries
patch by Pranav Shenoy; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-17198
2025-09-11 11:20:20 -05:00
Dmitry Konstantinov 06440e947a Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Prevent too long table names not fitting file names
2025-09-10 23:39:17 +01:00
Dmitry Konstantinov 7f92e1ac2c Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Prevent too long table names not fitting file names
2025-09-10 23:09:58 +01:00
Dmitry Konstantinov bff43df7db Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Prevent too long table names not fitting file names
2025-09-10 22:59:34 +01: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
Marcus Eriksson 55db3181fb Make legacy index rebuilds safe on Gossip -> TCM upgrades
patch by Caleb Rackliffe; reviewed by Marcus Eriksson for CASSANDRA-20887

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Marcus Eriksson <marcuse@apache.org>
2025-09-09 13:59:26 -05:00
Caleb Rackliffe ed00bf9a93 Minor improvements and hardening for IndexHints
- Enforce a more reasonable limit on the number of included/excluded indexes
- Serialize vints rather than shorts in IndexSetSerializer
- Return Iterable from notExcluded() to avoid set creation
- Avoid redundant iteration in MessagingService#endpointsWithConnectionsOnVersionBelow()

patch by Caleb Rackliffe; reviewed by Marcus Eriksson for CASSANDRA-20888
2025-09-09 11:04:42 -05:00
Benedict Elliott Smith b4f6c7c617 Topology compaction omits image records if minEpoch is ahead of last image
Also Fix:
 - RegisteredCallback should remove itself from callback map when cancelled
 - Do not throw CancellationException when processing requests that have been aborted, as may be caused by a successful meaningful reply that can be overridden
 - system_accord_debug.{executors,coordinations} fail with ClassCastException
 - CommandStore.updateMinHlc eats up CPU as called much too often
 - AccordCache not notifying flushed on shutdown
Also Improve:
 - Support skipping Deps
 - Violation information reported
 - Sort CommandStore shards by id

patch by Benedict; reviewed by Aleksey Yeschenko for CASSANDRA-20896
2025-09-09 11:11:23 +01:00
Himanshu Jindal 965a39166c Stop repair scheduler if two major versions are detected
patch by Himanshu Jindal; reviewed by Jaydeepkumar Chovatia, Andy Tolbert for CASSANDRA-20048
2025-09-08 09:26:31 -07:00
Dmitry Konstantinov ecaa650a50
Optimize audit logic for batch operations especially when audit is not enabled for DML
Avoid audit batch event creation if audit for batch is not enabled (random UIID generation is not very cheap)
Avoid String.format in a potential hot path

Patch by Dmitry Konstantinov; reviewed by Štefan Miklošovič for CASSANDRA-20885
Co-authored-by: Štefan Miklošovič
2025-09-08 16:40:44 +02:00
Dmitry Konstantinov 39302ddcbc Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Add VS code local folder to gitignore
2025-09-08 00:39:53 +01:00
Dmitry Konstantinov 5d83175952 Merge branch 'cassandra-4.1' into cassandra-5.0
* cassandra-4.1:
  Add VS code local folder to gitignore
2025-09-08 00:38:46 +01:00
Dmitry Konstantinov 04d56d4bab Merge branch 'cassandra-4.0' into cassandra-4.1
* cassandra-4.0:
  Add VS code local folder to gitignore
2025-09-08 00:37:38 +01:00
Ruslan Fomkin 4484f2b73c Add VS code local folder to gitignore
patch by Ruslan Fomkin; reviewed by Piotr Kolaczkowski, Dmitry Konstantinov, Maxwell Guo for CASSANDRA-20389
2025-09-08 00:36:11 +01:00
Benedict Elliott Smith b91731b5a3 All pending topology notifications must be propagated to a newly published epoch, not only the pending notification for that epoch
Also Fix:
 - JournalAndTableKeyIterator not merging in consistent order, which can lead to replaying topologies in non-ascending order
 - Invariant failure when reporting topologies if fetchTopologies on startup yields a gap
 - removeRedundantMissing could erroneously remove missing dependencies occurring after the new appliedBeforeIndex
 - Invariant failure for some propagate calls supplying 'wrong' addRoute
 - Disambiguate nextTxnId and nextTxnIdWithDefaultFlags
Also Improve:
 - LocalLog should not use NoSuchElementException for control flow (instead use ConcurrentSkipListMap)

patch by Benedict; reviewed by Aleksey Yeschenko for CASSANDRA-20886

 - JournalAndTableKeyIterator not merging in consistent order
2025-09-04 16:40:42 +01:00
Mick Semb Wever 5c7d8d8982
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Fix resolution of base job branch determination in .build/run-ci
2025-09-04 11:16:29 +02:00
Mick Semb Wever 8ccdbb88ed
Fix resolution of base job branch determination in .build/run-ci
patch by Mick Semb Wever; reviewed by Štefan Miklošovič for CASSANDRA-20875
2025-09-03 23:08:17 +02:00
Alex Petrov 0151131e43 Split out Topologies into Partitions
patch by Alex Petrov; reviewed by Benedict for CASSANDRA-20838
2025-09-03 19:04:45 +01:00
Alex Petrov ae673a31cc Startup sequence improvements follow-up
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20822
2025-09-03 16:08:15 +01:00
Stefan Miklosovic 2f56702d30
Merge branch 'cassandra-5.0' into trunk 2025-09-03 13:37:06 +02:00
Stefan Miklosovic b3cc1d0abd
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-09-03 13:36:53 +02:00
Stefan Miklosovic b907c1e973
bump version in build.xml to 4.1.11 2025-09-03 13:36:06 +02:00
Yifan Cai 19bad84b6b Add Swift Cassandra client to drivers list in documentation
Patch by Yifan Cai; Reviewed by Abe Ratnofsky for CASSANDRA-20879
2025-09-02 13:56:44 -07:00
Benedict Elliott Smith a813a51f7c Improve Observability:
- Track all active Coordinations
 - Refactor Replica/Coordinator metrics and report Coordinator exhausted/preempted/timeout
 - DurabilityQueue metrics and visibility
Also Fix:
 - WaitingState can get cause distributed stall when asked to wait for CanApply if not yet PreCommitted; track separate querying state and advance this to the next achievable state rather than the desired final state
 - Stalled coordinators should not prevent recovery
 - Edge case with fetch unable to make progress when pre-bootstrap and all peers have GC'd
 - Dependency initialisation for sync points across certain ownership changes
 - SyncPoint propagation may not include all of the epochs required on the receiving node for ranges they have lost but not closed, and receiving node does not validate them
 - Stable tracker accounting with LocalExecute
 - Do not prune non-durable APPLIED as must be reported in dependencies until durably applied (so as not to break recovery)
 - Ensure we cannot race with replies when initiating Coordination
 - ProgressLog does not guarantee to clear home or waiting states when erased or invalidated by compaction
 - WaitingState on non-home shard cannot guarantee progress once home shard is Erased
 - WaitingOnSync handles retired ranges incorrectly
Also Improve:
 - Standardise failure accounting, use null to represent single reply timeouts
 - BurnTest record/replay to/from file

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20878
2025-09-02 18:47:46 +01:00
Joel Shepherd eeb227be2f Improving CONTRIBUTING.md for new contributors
patch by jcshepherd; reviewed by Maxwell-Guo, Michael Semb Wever for CASSANDRA-20852
2025-09-01 23:54:00 +08:00
Stefan Miklosovic 9c93d52ac9
Implement nodetool history
patch by Stefan Miklosovic; reviewed by Maxim Muzafarov for CASSANDRA-20851
2025-09-01 16:18:19 +02:00
Stefan Miklosovic 63fb8741b8
Merge branch 'cassandra-5.0' into trunk 2025-09-01 13:00:36 +02:00
Stefan Miklosovic e45a330f54
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-09-01 12:53:53 +02:00
Stefan Miklosovic c9717b4ed5
Redact security-sensitive information in system_views.settings
patch by Stefan Miklosovic; reviewed by Maxwell Guo, Francisco Guerrero for CASSANDRA-20856
2025-09-01 12:44:43 +02:00
Stefan Miklosovic deadaea157
Merge branch 'cassandra-5.0' into trunk 2025-09-01 10:27:32 +02:00
Stefan Miklosovic dd8839320f
Fix job name determination in .build/run-ci for trunk case
patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-20874
2025-09-01 10:26:57 +02:00
Paulo Motta 06f7f5e265 Merge branch 'cassandra-5.0' into trunk 2025-08-29 14:02:21 -04:00
Paulo Motta c5d6a36fa7 Expose StorageService.dropPreparedStatements via JMX
Patch by Paulo Motta; Reviewed by Dmitry Konstantinov, Jeremiah Jordan for CASSANDRA-20870
2025-08-29 14:00:03 -04:00
Stefan Miklosovic e57fdf1676
Merge branch 'cassandra-5.0' into trunk 2025-08-28 17:26:30 +02:00
Stefan Miklosovic decd51eb5d
ninja: add license to .build/run-ci.d/requirements.txt to pass rat check 2025-08-28 17:23:29 +02:00
Isaac Reath f41b625e48 Expose Metric for Prepared Statement Cache Size (in bytes)
Patch by Isaac Reath; Reviewed by Paulo Motta and guo Maxwell for
CASSANDRA-20864

Closes #4345
2025-08-28 10:54:00 -04:00
Marcus Eriksson f53c051118 Accord: Minor serialization changes
Patch by marcuse; reviewed by David Capwell and Benedict Elliott Smith for CASSANDRA-20840
2025-08-28 13:31:35 +02:00
Stefan Miklosovic 2539f1c843
Merge branch 'cassandra-5.0' into trunk 2025-08-28 12:33:29 +02:00
Stefan Miklosovic d340b9d0df
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-28 12:33:19 +02:00
Stefan Miklosovic d48bfcce44
Prepare debian changelog for 4.1.10 2025-08-28 12:02:40 +02:00
Stefan Miklosovic c4a7cf9e02
Merge branch 'cassandra-5.0' into trunk 2025-08-28 11:49:24 +02:00
Stefan Miklosovic be96162f6c
Merge branch 'cassandra-4.1' into cassandra-5.0 2025-08-28 11:48:03 +02:00
Stefan Miklosovic c632e66e85
Merge branch 'cassandra-4.0' into cassandra-4.1 2025-08-28 11:46:58 +02:00
Stefan Miklosovic 29e45b5d82
Increase memory available for javadoc generation
javadoc target is behaving unpredictably, sometimes fails, sometimes does not.
I strongly suspect that it just does not have enough memory available and it fails.
This is currently a blocker for releases. My empirical testing shows that more memory
we assign to javadoc generation, less probable it is it will fail to finish successfuly.

patch by Stefan Miklosovic for CASSANDRA-20868
2025-08-28 11:43:13 +02:00
mck 4a548b0f28
Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  K8s immutable provisioning of ci-cassandra.apache.org jenkins instances
2025-08-27 23:39:44 +02:00