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>
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>
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>
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
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>
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>
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
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>
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>
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>
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>
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
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>