Commit Graph

273 Commits

Author SHA1 Message Date
Dmitry Konstantinov 72d53e3919 Implement custom CassandraThread to keep direct references to frequently used thread local objects
patch by Dmitry Konstantinov; reviewed by Benedict Elliott Smith, Stefan Miklosovic for CASSANDRA-21020
2026-06-02 13:56:59 +01:00
Maxim Muzafarov 3dc33de6ea
Organize imports and standartize import order across entire codebase
Patch by Maxim Muzafarov; Reviewed by Michael Semb Wever for CASSANDRA-17925
2025-12-30 22:34:14 +01:00
samlightfoot 58ee847968 Adopt Unsafe::invokeCleaner for Direct ByteBuffer cleaning
Patch by Samuel D Lightfoot; Reviewed by Ariel Weisberg and Abe Ratnosfky for CASSANDRA-20677
2025-06-09 14:14:40 -04:00
Ariel Weisberg c10c84b9cd Accord/non-Accord interoperability and support for live migration
Patch by Ariel Weisberg; Reviewed by Blake Eggleston for CASSANDRA-18129

Co-authored-by: Blake Eggleston <beggleston@apple.com>
2025-04-17 11:59:49 -07:00
Sam Tunnicliffe 48dcf5e092 Snitch re-implementation
Deprecate IEndpointSnitch entirely, to be replaced with new interfaces:
* Locator for endpoint -> location mapping
* InitialLocationProvider to supply the DC & rack for registration
* NodeProximity for sorting endpoints and replicas at query time

For migration/upgrade/deprecation, nodes can still be configured with
an IEndpointSnitch implementation via endpoint_snitch in config, but
we hide this with a facade and only present the new interfaces.

Patch by Sam Tunnicliffe and Marcus Eriksson; reviewed by Sam
Tunnicliffe and Marcus Eriksson for CASSANDRA-19488

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2024-12-16 11:25:39 +00:00
Branimir Lambov 54e4688069 Parallelized UCS compactions
patch by Branimir Lambov, reviewed by Sylvain Lebresne for CASSANDRA-18802
2024-12-11 17:37:09 +02:00
Marcus Eriksson 1a46e96890 Don't start MessagingService unnecessarily to speed up tests and to avoid memory leak
Patch by marcuse; reviewed by Alex Petrov for CASSANDRA-19125
2023-12-08 12:42:53 +01:00
Jacek Lewandowski 008c1b397b Merge branch 'cassandra-5.0' into trunk
* cassandra-5.0:
  Enable Direct-IO feature for CommitLog files using Java native API's.
2023-11-29 11:48:30 +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
Sam Tunnicliffe ae0842372f Implementation of Transactional Cluster Metadata as described in CEP-21
An overview of the core components can be found in the included
TransactionalClusterMetadata.md

patch by Alex Petrov, Marcus Eriksson and Sam Tunnicliffe; reviewed by
Alex Petrov, Marcus Eriksson and Sam Tunnicliffe for CASSANDRA-18330

Co-authored-by: Marcus Eriksson <marcuse@apache.org>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2023-11-24 10:26:08 +00:00
Branimir Lambov 957eca2fb5 Implementation of the Unified Compaction Strategy as described in CEP-26
The approach is documented in the included UnifiedCompactionStrategy.md.

Also included:
- Generalize prettyPrint to prettyPrintBinary (with 2^10 multiplier,
  e.g. MiB) and prettyPrintDecimal (with 1000 multiplier, e.g. ms)
  that cover the full range of double, and add a parseHumanReadable
  method that can read both.

- CASSANDRA-18123: Fix invalid reuse of metadata collector during flushing

- Fix invalid token range splitting with non-unit weights

- Add flushSizeOnDisk metric

- Add ability to change compaction default in YAML

patch by Alex Sorokoumov, Branimir Lambov, Dimitar Dimitrov and Stefania Alborghetti
reviewed by Alex Sorokoumov, Jaroslaw Grabowski and Maxwell Guo for CASSANDRA-18397
2023-07-19 11:22:32 +03:00
Bereng 1adbea5a06 Extend maximum expiration date
patch by Berenguer Blasi; reviewed by Andrés de la Peña for CASSANDRA-14227
2023-06-05 07:18:34 +02:00
Maxim Muzafarov f650908648 Moved system properties and envs to CassandraRelevantProperties and CassandraRelevantEnv respectively
Patch by Maxim Muzafarov; reviewed by Stefan Miklosovic and Jacek Lewandowski for CASSANDRA-17797
2023-05-11 07:39:16 +02:00
Stefan Miklosovic 61a83b3cef
Merge branch 'cassandra-4.1' into trunk 2023-01-28 17:55:57 +01:00
Stefan Miklosovic b81d39306c
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-01-28 17:11:29 +01:00
Stefan Miklosovic 2a8e1972fd
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-01-28 16:54:39 +01:00
Stefan Miklosovic 8076f37c06
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-01-28 16:33:36 +01:00
Josh McKenzie 377e114cb1 Introduce compaction priorities to prevent upgrade compaction inability to finish
Patch by Alex Petrov; reviewed by Josh McKenzie and Marcus Eriksson for CASSANDRA-17851

Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
2022-09-07 12:30:40 -04:00
Josh McKenzie 3e0b94565a Add support to generate a One-Shot heap dump on unhandled exceptions
Patch by Caleb Rackliffe; reviewed by Josh McKenzie, David Capwell, and Jon Meredith for CASSANDRA-17795

Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
2022-08-15 10:48:29 -04:00
Jacek Lewandowski 570732375e Fix a race condition where a keyspace can be opened while it is being removed
patch by Jacek Lewandowski; reviewed by Andrés de la Peña and Ekaterina Dimitrova for CASSANDRA 17658
2022-08-12 13:34:05 +02:00
Jacek Lewandowski c1d89c32d2 Fix a race condition where a keyspace can be opened while it is being removed
patch by Jacek Lewandowski; reviewed by Andrés de la Peña and Ekaterina Dimitrova for CASSANDRA 17658
2022-08-12 13:26:16 +02:00
Ekaterina Dimitrova 2eac2590bf Revert removal of withBufferSizeInMB(int size) to CQLSSTableWriter.Builder and deprecate it in favor of withBufferSizeIniB(int size);update the docs
patch by Ekaterina Dimitrova; reviewed by Michael Semb Wever for CASSANDRA-17675
2022-06-02 15:31:23 -04:00
Branimir Lambov e4e19e33fa Add memtable API (CEP-11)
patch by Branimir Lambov; reviewed by Andrés de la Peña and Caleb Rackliffe for CASSANDRA-17034
2022-04-29 14:56:20 +03:00
Yifan Cai 3a6f690731 Limit the maximum hints size per host
patch by Yifan Cai; reviewed by Dinesh Joshi, Francisco Guerrero for CASSANDRA-17142
2022-02-10 17:18:29 -08:00
Ekaterina Dimitrova c51a7c66fc Bulk change of units around the code to support the move to the new configuration framework
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:57 -05:00
Ekaterina Dimitrova 5bb4bab12f DataRate parameters transition to the new framework
Fix the DB descriptorRefTest which failed on the previous commit
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:27:27 -05:00
nvharikrishna 23e88ad0c8 Remove use of deprecated File classes in tests
Patch by Venkata Harikrishna Nukala; reviewed by brandonwilliams and
bereng for CASSANDRA-17126
2022-01-31 10:21:00 -06:00
Benedict Elliott Smith 209c35aa62 [CEP-10] Phase 4: Cluster and Code Simulation
patch by Benedict; reviewed by Sam Tunnicliffe for CASSANDRA-17008

Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
Co-authored-by: Alex Petrov <oleksandr.petrov@gmail.com>
2021-11-30 16:05:54 +00:00
Andrés de la Peña 42b284d5c9 Add MV utilities to CQLTester
patch by Andrés de la Peña and Zhao Yang; reviewed by Berenguer Blasi for CASSANDRA-17122

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Zhao Yang <jasonstack.zhao@gmail.com>
2021-11-10 12:34:03 +00:00
Brandon Williams 599294c919 Replace System.currentTimeMillis with Clock.Global.currentTimeMillis
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-17123
2021-11-09 09:43:57 -06:00
Benedict Elliott Smith 6a1d9de3d9 [CASSANDRA-16926] CEP-10 Phase 1: Mockable Filesystem
patch by Benedict; reviewed by Aleksey Yeschenko, Sam Tunnicliffe and Aleksei Zotov for CASSANDRA-16926

Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Aleksey Yeschenko  <aleksey@apache.org>
2021-10-07 14:28:00 +01:00
Benedict Elliott Smith be1f050bc8 [CASSANDRA-16925] CEP-10 Phase 1: Mockable Task Execution
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2021-10-07 14:27:52 +01:00
Benedict Elliott Smith e5b92e1088 [CASSANDRA-16924] CEP-10 Phase 1: Mockable Blocking Concurrency Primitives
patch by Benedict; reviewed by Sam Tunnicliffe and Aleksei Zotov for CASSANDRA-16924

Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2021-10-07 14:27:44 +01:00
Benedict Elliott Smith 15a2fe00fc [CASSANDRA-16923] CEP-10 Phase 1: Mockable System Clock
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
Co-authored-by: Aleksey Yeschenko  <aleksey@apache.org>
Co-authored-by: Sam Tunnicliffe <samt@apache.org>
2021-09-29 19:38:34 +01:00
Bereng 6ad259238d Flaky ViewComplexTest, ViewFilteringTest and InsertUpdateIfConditionTest
patch by Berenguer Blas; reviewed by Ekaterina Dimitrova for CASSANDRA-16670
2021-06-02 09:29:20 +02:00
Ekaterina Dimitrova 62e1d74701 Bump tests to test Protocol V5
authored by Ekaterina Dimitrova; reviewed by Sam Tunnicliffe for CASSANDRA-16613
2021-05-08 10:05:58 -04:00
Marcus Eriksson f5a0c4c962 Merge branch 'cassandra-3.11' into trunk 2021-04-27 08:35:19 +02:00
Scott Carey a68a7c5181 Nodetool garbagecollect should retain SSTableLevel for LCS
Patch by Scott Carey; reviewed by marcuse for CASSANDRA-16634
2021-04-27 08:34:17 +02:00
jacek-lewandowski d048efccd6 Don't fail all view tests because one method timed out
Patch by Jacek Lewandowski; reviewed by brandonwilliams for
CASSANDRA-16520
2021-03-16 07:58:32 -05:00
Benjamin Lerer b47048797f Merge branch cassandra-3.11 into trunk 2020-11-30 11:43:14 +01:00
Stefan Miklosovic fc9a5a7c63
Rate limit validation compactions using compaction_throughput_mb_per_sec
patch by Stefan Miklosovic; reviewed by Mick Semb Wever, Chris Lohfink for CASSANDRA-16161
2020-11-20 09:45:11 +01:00
Marcus Eriksson fa7659253f Merge branch 'cassandra-3.11' into trunk 2020-09-16 11:11:15 +02:00
Marcus Eriksson f41ea9fb14 Make sure LCS handles duplicate sstable added/removed notifications correctly.
Patch by marcuse; reviewed by Blake Eggleston for CASSANDRA-14103
2020-09-16 11:04:09 +02:00
Blake Eggleston ccab496d2d Add byte array backed cells
Patch by Blake Eggleston; reviewed by Caleb Rackliffe and Marcus Eriksson for CASSANDRA-15393
2020-09-14 08:32:44 -07:00
Stephen Mallette 0d99470f15
Improved testing for CacheMetrics and ChunkCacheMetrics
Fixed failing assertions in CachingBench.

 patch by Stephen Mallette; reviewed by Mick Semb Wever, Branimir Lambov for CASSANDRA-15788
2020-08-19 16:52:41 +02:00
Ekaterina Dimitrova b85ede633c generateSplits method replaced the generateRandomTokens for ReplicationAwareTokenAllocator.
Patch by Ekaterina Dimitrova; reviewed by Berenguer Blasi, adelapena and brandonwilliams for CASSANDRA-15877
2020-06-23 14:18:24 -05:00
Blake Eggleston 8576e769d1 Minimize BTree iterator allocations
Patch by Blake Eggleston; Reviewed by Benedict Elliott Smith for CASSANDRA-15389
2020-04-10 17:38:41 -07:00
Jon Meredith 860de83a02 Enable nodetool/JMX resizing of processing stage executor pool
This patch enables users to resize the thread pools used by the
various processing stages at runtime using nodetool or over JMX.

Changes:

Switch to using idiomatic Java Executor names for thread pool configuration
functions.  Deprecate `{get,set}CoreThreads` for `{get,set}CorePoolSize`,
`{get,set}MaximumThreads` for `{get,set}MaximumPoolSize`.

Introduce a new ResizableThreadPool interface used by SEPExecutorMBean and
JMXEnabledThreadPoolExecutorMBean to expose a common interface for setting
thread pool sizes.  Replace singled usage of JMXConfigurableThreadPoolExecutor
in repair code with JMXEnabledThreadPoolExecutor as both are now resizable
(since CASSANDRA-5044) and ResizableThreadPool now exporting the same API
over JMX.

Implement {get,set}CorePoolSize and {get,set}MaximumPoolSize for SEPExecutor.
To change the maximum pool size for SEPExecutor, the number of permits
has been changed so that it can go negative if the size of the pool is
reduced.  If a SEPWorker discovers the number of permits is negative when
looking for more work it stops.

Add `nodetool getconcurrency` to retrieve the current core and maximum
pool sizes for all of the executor stages and `nodetool setconcurrency`
to change core/maximum pool sizes where permitted.

Update Stage to lazily initialize the executors so that in-JVM dtests
can reference Verbs (which have an associated Stage) in message filtering
without starting up all the executors.  Introduce new Stage.execute/submit
convenience functions to avoid needing to lookup the executor first.

Update Stage executors to pass a consumer function that
updates the configuration used to initialize the thread pools. This keeps
the config in sync with changes made over JMX to `org.apache.cassandra.{request,internal}.*`
or via nodetool. Also implement for native transport threads - although
that can currently only be updated by JMX rather than nodetool.

Introduce a new `JMXEnabledSingleThreadedExecutor` for executors
that need to be single threaded for correctness that forbids changing
the core/maximum pool sizes (previously it was possible to set gossip to
run multiple threads over JMX).

Patch by Jon Meredith; reviewed by Benedict Elliot Smith for CASSANDRA-15277
2019-11-11 14:03:43 +00:00
nvharikrishna b97fc302b1 Remove StageManager
patch by Venkata Harikrishna Nukala; reviewed by Benedict for CASSANDRA-15227
2019-10-28 13:20:29 +00:00
Benedict Elliott Smith 310a48efcf Rewrite the internode messaging subsystem
patch by Aleksey Yeschenko and Benedict Elliott Smith; reviewed by Alex
Petrov, Aleksey Yeschenko, and Benedict Elliott Smith for CASSANDRA-15066

Co-authored-by: Aleksey Yeschenko <aleksey@apache.org>
Co-authored-by: Benedict Elliott Smith <benedict@apache.org>
2019-06-12 16:26:54 +01:00