Commit Graph

1398 Commits

Author SHA1 Message Date
ayushis 6ab45971fc
Introduce pluggable crypto providers and default to Amazon Corretto Crypto Provider
patch by Ayushi Singh; reviewed by Stefan Miklosovic, Michael Semb Wever and Maxim Muzafarov for CASSANDRA-18624

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-07-28 12:15:33 +02:00
Caleb Rackliffe 394d4b1168 Add support for index implementation selection via USING for CREATE INDEX
patch by Caleb Rackliffe; reviewed by Maxwell Guo and Andres de la Peña for CASSANDRA-18615
2023-07-26 13:35:07 -05:00
Mike Adamson e5e0f3a844 Literal on-disk index and index write path (#9)
This commit contains the following additions
 to SAI:
 - The index write path and index building
   based around StorageAttachedIndexBuilder
   and StorageAttachedIndexWriter
 - The on-disk index versioning using the
   SSTable Descriptor analog IndexDescriptor
   with Version and OnDiskFormat
 - The literal on-disk index using the
   LiteralIndexWriter

patch by Mike Adamson; reviewed by Caleb Rackliffe and Andres de la Peña for CASSANDRA-18062

Co-authored-by: Mike Adamson <mikeatdot@gmail.com>
Co-authored-by: Caleb Rackliffe <calebrackliffe@gmail.com>
Co-authored-by: Andres de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Piotr Kołaczkowski <pkolaczk@gmail.com>
Co-authored-by: Jason Rutherglen <jason.rutherglen@gmail.com>
2023-07-26 13:35:07 -05:00
Ekaterina Dimitrova b92184e90c Update SyncUtil for JDK11 and JDK17
Remove --add-opens java.base/java.nio=ALL-UNNAMED which is not needed anymore

patch by Ekaterina Dimitrova; reviewed by Jacek Lewandowki for CASSANDRA-17909
2023-07-25 15:33:39 -04:00
Ekaterina Dimitrova 5722191a38 Fix generate.sh and remove dead J8 config files
patch by Ekaterina Dimitrova; reviewed by Brandon Williams for CASSANDRA-18255
2023-07-25 12:20:08 -04:00
Ekaterina Dimitrova 3755934e52 Drop JDK8 and add JDK17, remove eclipse-warnings in favor of Checker Framework and upgrade checkstyle
patch by Ekaterina Dimitrova; reviewed by Jeremiah Jordan, Berenguer Blasi, Michael Semb Wever and Jacek Lewandowski for CASSANDRA-18255
2023-07-24 15:16:53 -04:00
Benjamin Lerer 600f4d9a69 Upgrade Jamm version to 0.4.0
This upgrade also fixes issues with PhantomReferences and the test problems from CASSANDRA-17884 anad CASSANDRA-16304

patch by Benjamin Lerer; reviewed by Ekaterina Dimitrova for CASSANDRA-18239
2023-07-22 14:55:49 -04:00
Stefan Miklosovic c273017b25
Add AzureSnitch
As we were implementing the snitch itself, we noticed that the constructors
for cloud-based snitches are unnecessarilly complicated and
we took the opportunity to make them simpler.

patch by Stefan Miklosovic; reviewed by German Eichberger and Jacek Lewandowski for CASSANDRA-18646
2023-07-20 21:35:07 +02: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
Daniel Jatnieks aac070681b Disable the deprecated keyspace/table thresholds and convert them to guardrails
patch by Daniel Jatnieks; reviewed by Andrés de la Peña and Brandon Williams for CASSANDRA-18617
2023-07-14 12:23:04 +01:00
Stefan Miklosovic 903857b4ef
Deprecate CloudstackSnitch and remove duplicate code in snitches
The patch also refactors existing cloud snitches to get rid of the duplicate code,
this is the logical follow-up of CASSANDRA-16555 where AbstractCloudMetadataServiceConnector was introduced.

patch by Stefan Miklosovic; reviewed by Jacek Lewandowski, Jackson Fleming and Maxwell Guo for CASSANDRA-18438
2023-07-14 12:38:30 +02:00
Andrés de la Peña c579faa488 Remove deprecated compaction_tombstone_warning_threshold and compaction_large_partition_warning_threshold from yaml
patch by Andrés de la Peña; reviewed by Brandon Williams for CASSANDRA-18626
2023-06-28 21:50:15 +01:00
Stefan Miklosovic ea5291c2ca
Merge branch 'cassandra-4.1' into trunk 2023-06-28 16:43:43 +02:00
Stefan Miklosovic a57f0396fa
Merge branch 'cassandra-4.0' into cassandra-4.1 2023-06-28 16:33:08 +02:00
Stefan Miklosovic b099aae3f0
Merge branch 'cassandra-3.11' into cassandra-4.0 2023-06-28 16:27:19 +02:00
Stefan Miklosovic b6fdc80456
Merge branch 'cassandra-3.0' into cassandra-3.11 2023-06-28 16:20:05 +02:00
Stefan Miklosovic 4ea7bb25b4
Add support for AWS Ec2 IMDSv2
patch by Stefan Miklosovic; reviewed by Jacek Lewandowski and Brandon Williams for CASSANDRA-16555

Co-authored-by: Jacek Lewandowski <lewandowski.jacek@gmail.com>
Co-authored-by: Paul Rütter <paul@blueconic.com>
2023-06-28 16:08:39 +02:00
Stefan Podkowinski e67fa69114 Remove hard-coded SSL cipher suites and protocols
patch by Stefan Podkowinski; reviewed by Robert Stupp for CASSANDRA-10508

backported in CASSANDRA-18575 by German Eichberger; reviewed by
brandonwilliams
2023-06-21 06:25:18 -05: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
Andrés de la Peña b72da02611 Add guardrail for partition tombstones and deprecate compaction_tombstone_warning_threshold
patch by Andrés de la Peña; reviewed by Berenguer Blasi and Maxwell Guo for CASSANDRA-17194
2023-06-01 10:56:40 +01:00
Jacek Lewandowski f16fb6765b Implementation of the trie-indexed SSTable format (BTI) as described in CEP-25.
Documentation in the included BTIFormat.md.

patch by Branimir Lambov and Jacek Lewandowski; reviewed by Caleb Rackliffe and Maxwell Guo for CASSANDRA-18398
2023-05-29 16:59:05 +03:00
Andrés de la Peña b0aa44b27d Add guardrail for partition size and deprecate compaction_large_partition_warning_threshold
patch by Andrés de la Peña; reviewed by Berenguer Blasi and Maxwell-Guo for CASSANDRA-18500
2023-05-25 17:49:47 +01:00
Marcus Eriksson f36fd33e33 Merge branch 'cassandra-4.1' into trunk 2023-05-25 08:43:27 +02:00
Marcus Eriksson 72fc04d238 Merge branch 'cassandra-4.0' into cassandra-4.1 2023-05-25 08:43:15 +02:00
Marcus Eriksson aafb4d1944 Improve nodetool enable{audit,fullquery}log
Patch by marcuse; reviewed by Dinesh Joshi and Mick Semb Wever for CASSANDRA-18550
2023-05-25 08:41:12 +02:00
Jacek Lewandowski fe0e04c231 Fix sstable formats configuration
- refactored sstable format configuration
- sstable formats are discovered via ServiceLoader
- options configuration for sstable formats can be included in yaml
- yaml may include selected sstable format and version (version is not yet supported)
- auto saved caches refactored - they include additional metadata component which contains necessary mappings

patch by Jacek Lewandowski; reviewed by David Capwell for CASSANDRA-18441
2023-05-18 12:54:08 +02:00
Jordan West 2ff1ad4788 Add Timestamp Bound Guardrail (bound user supplied timestamps within a certain range)
Patch by Jordan West; Reviewed by Andrés de la Peña and Brandon Williams for CASSANDRA-18352
2023-05-17 13:06:27 -07:00
Lorina Poland 998a98eae8
Reorganizing doc directories using new info arch
patch by Lorina Poland; reviewed by Mick Semb Wever, Štefan Miklošovič for CASSANDRA-18228
2023-04-29 17:59:24 +02:00
Mick Semb Wever 33d1c4315c
Remove the explicit disabling of UseBiasedLocking as it is the default since jdk15
https://openjdk.org/jeps/374

 patch by Mick Semb Wever; reviewed by Brandon Williams, Ekaterina Dimitrova for CASSANDRA-17869
2023-04-24 21:42:00 +02:00
Stefan Miklosovic 531b4cde43
Merge branch 'cassandra-4.1' into trunk 2023-04-17 10:40:52 +02:00
Maulin Vasavada bd49f6ff26
Allow keystore and truststore passwords to be nullable
patch by Maulin Vasavada; reviewed by Stefan Miklosovic and Caleb Rackliffe for CASSANDRA-18124
2023-04-14 14:02:51 +02:00
Ekaterina Dimitrova c387462485 ninja: CASSADRA-17199; to be reverted after CASSANDRA-18239 2023-04-06 14:54:04 -04:00
Ekaterina Dimitrova d1d733bee5 Fix JDK17 startup issue after CASSANDRA-17199; temporary workaround, to be reverted after CASSANDRA-18239
Patch by Ekaterina Dimitrova; reviewed by Michael Semb Wever for CASSANDRA-18431
2023-04-05 20:53:42 -04:00
Andrés de la Peña 2e2a49fcdc CEP-20: Dynamic Data Masking
Allows to attach the native masking functions and UDFs to the definitions of
table columns in the schema, as defined by CEP-20.

The functions masking a column can be specified on CREATE TABLE queries, right
at the end of the column definition. The mask of a column can also be changed
or dropped with an ALTER TABLE query. Once a column is masked, SELECT queries
will always return the masked value of the column. That masking is done on the
coordinator, at the end of the query execution. Thus, masking won't affect any
filters or ordering, which would be based on the clear values of the masked
columns. Column masks are stored on the table system_schema.column_masks.

A new UNMASK permission allows to see the clear data of columns with an
attached mask. Also, a new SELECT_MASKED permission allows to run SELECT
queries restricting the clear values of masked columns. Superusers have both
permissions by default, whereas regular users don't have them.

Dynamic data masking can be enabled/disabled with the config property
dynamic_data_masking_enabled in cassandra.yaml. It is disabled by default.

This is the combination of multiple tickets:

 * Add masking functions to column metadata (CASSANDRA-18068)
 * Add UNMASK permission (CASSANDRA-18069)
 * Add SELECT_MASKED permission (CASSANDRA-18070)
 * Add support for using UDFs as masking functions (CASSANDRA-18071)
 * Add feature flag for dynamic data masking (CASSANDRA-18316)

patch by Andrés de la Peña; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-17940
2023-03-24 13:57:18 +00:00
Ekaterina Dimitrova de1ff6d4d1 Fix nodetool/sjk hh, Java17
patch by Ekaterina Dimitrova, reviewed by Brandon Williams for CASSANDRA-18242
2023-03-23 14:58:51 -04:00
Mick Semb Wever eee211fdbb
Update OpenHFT dependencies (chronicle-queue, chronicle-core, chronicle-bytes, chronicle-wire, chronicle-threads)
Some transitive dependencies to these have also been added to raise their versions. asm-* transitive dependencies have been excluded.

 patch by Mick Semb Wever; reviewed by Ekaterina Dimitrova for CASSANDRA-18049
2023-03-22 09:03:33 +01:00
Jacek Lewandowski b7e1e44a90 SSTable format API
Summary of the changes:

Format, reader and writer
---------------------------
There are a lot of refactorings around sstable related classes aiming to extract the most generic functionality to the top-level entities and push down implementation-specific stuff to the actual implementation. In Particular, the top-level, implementation agnostic classes/interfaces are SSTableFormat interface, SSTable, SSTableReader, SSTableWriter, IVerifier, and IScrubber. The rest of the codebase has been reviewed for explicit usages of big table format-specific usages of sstable classes and refactored. SSTable, SSTableReader, and SSTableWriter have their builders. Builders make a hierarchy that follows the same inheritance structure as readers and writers.

There are also partial implementations that add support for some features and may or may not be used by the custom implementations. They include:
- AbstractSSTableFormat - adds an implementation of some initialization methods - in practice, all of the format implementations should extend this class
- SSTableReaderWithFilter - add support for Bloom filter to the reader
- SortedTableWriter - generic implementation for a writer which writes partitions in the default order to the data file, supports Bloom filter and some index of partitions
- IndexSummarySupport - interface implemented by the readers using index summaries
- KeyCacheSupport - interface implemented by the readers using row key cache

Descriptor
---------------------------
Refactored the Descriptor class so that:
- All paths are created from the base directory File rather than from a String
- All the methods named *filename* producing full paths were made private; their current implementations are returning file names rather than paths (the naming was inconsistent)
- The usages of the `filenameFor` method were refactored to use the `fileFor` method
- The usages of the `fromFilename` method were refactored to use a  `fromFileWithComponent(..., false).left` expression
In essence, the Descriptor class is no longer working on String-based paths.

Index summaries
---------------------------
Removed the index summary from the generic SSTableReader class and created an interface IndexSummarySupport to be implemented by the readers that need it. Methods in related classes that refer back to the reader were refactored to support just readers of the SSTableReader & IndexSummarySupport type. Therefore, we will no longer need to assume that the generic SSTableReader has anything to do with an index summary.

A new IndexSummaryComponent class encloses data fields from the index summary file (note that aside from the index summary itself, the file includes the first and last partition of the sstable). The class has been extracted to deal with those fields and have that logic in a single place.

Filter
---------------------------
Refactored IFilter and its serialization - in particular, added the `serialize` method to the IFilter interface and moved loading/saving logic to a separate utility class FilterComponent.
Extracted the SSTableReaderWithFilter abstract reader extending the generic SSTableReader with filter support.
Extracted bloom filter metrics into separate entities allowing to plug them in if the implementation uses a filter.

Cache
---------------------------
Refactored CacheService to support different key-cache values. CacheService now supports arbitrary IRowIndexEntry implementation as a key-cache value. A new version of the auto-saving cache was created ("g") because some information about the type of serialized row index entry needs to be known before it is deserialized (or skipped). Therefore, the SSTableFormat type ordinal number is stored, which is sufficient because the IRowIndexEntry serializer is specific to the sstable format type.
Similarly to the IndexSummarySupport, a new KeyCacheSupport interface has to be implemented to mark the reader as supporting key-cache. It contains the default implementation of several methods the rest of the system relies on when the key-cache is supported.

Other changes
---------------------------
- Fixed disabling chunk cache - enable(boolean) method in ChunkCache does not make any sense - it makes a false impression it can disable chunk cache once enabled, while in fact, it only clears it. Added setFileCacheEnabled to DatabaseDescriptor

- Made WrappingUnfilteredRowIterator an interface

- DataInputStreamPlus extends InputStream - this makes it possible for input stream-based inheritors of DataInputPlus to extend DataInputStreamPlus. It simplifies coding because sometimes we want to get DataInputPlus implementation extending InputStream as an argument.

- Table and keyspace metrics were made pluggable - in particular, added the ability for a certain format to register gauges that are specific only to that format and make no sense for others

- Implemented mmapped region extension for compressed data

- Refactored FileHandle so that it is no longer closable

- Implemented WrappingRebufferer

- Introduced the SSTable.Owner interface to make SSTable implementation not reference higher-level entities directly. SSTable accepts passing null as the owner when there is no owner (like sometimes in offline tools) or passing a mock when needed in tests.

Individual commits
---------------------------

[4a87cd36fe] Fix disabling chunk cache
[c84c75ccf3] Made WrappingUnfilteredRowIterator an interface
[253d2b828e] Add getType to SSTableFormat
[3f169dcc20] Remove getIndexSerializer from SSTableFormat
[05bae1833b] Pull down rowIndexEntrySerializer field
[da675f2809] Moved RowIndexEntry
[673f0c5c39] Reduce usages of RowIndexEntry
[c72538be91] Refactor CacheService to support for different key cache values
[54d33ee656] Minor refactoring of ColumnIndex
[93862df967] Just moved AbstractSSTableIterator to o.a.c.io.sstable.format
[9e4566a1de] Refactored AbstractSSTableIterator
[a4e61e80bb] Extracted IScrubber and IVerifier interfaces
[20f78c7419] Push down implementation of SSTableReader.firstKeyBeyond
[f2c24e5774] Moved SSTableReader.getSampleIndexesForRanges to IndexSummary
[b6c3a6c1ea] Moved SSTableReader.getKeySamples implementation to IndexSummary
[c4b90ebb33] Refactor InstanceTidier so that it is more generic
[918d5a9e74] Refactor dropping page cache
[a52fb4d558] Refactor sstable metrics
[f6d10f930f] NEW (fix up) - DataInputStreamPlus extends InputStream
[8f6a56d972] Getting rid of index summary in SSTableReader
[4a918bf725] Removed direct usages of primary index from SSTableReader
[358fa32602] Refactor KeyIterator so that it is sstable format agnostic
[14c09d89c2] Remove explicit usage of Components outside of format specific classes
[feff14e137] Move clone methods implementation from SSTableReader to BigTableReader
[64e9787b10] Move saveIndexSummary and saveBloomFilter to SSTableReaderBuilder
[ae71fe6ed8] Moved indexSummary field to BigTableReader and made it private
[df9fd8c4b9] Moved ifile field to BigTableReader and made it private
[2be6ea9ecf] Moved static open methods for BigTableReader to the reader factory
[bc0e55ac48] Minor refactoring around IFilter and its serialization
[5b95704beb] Minor refactorings around IndexSummary
[87812335e8] Extracted TOCComponent class to deal with TOC file
[fdad092a6a] Extracted CompressionInfoComponent class
[39b47e388d] Extracted StatsComponent as a helper for elements of SSTable metadata
[cdb55bff47] Fix SSTable.getMinimalKey
[b99c6d5805] Refactor FileHandle so that it is no longer closable
[77b7f7ace5] Implement WrappingRebufferer
[b6868914dd] Add progressPercentage to ProgressInfo
[7fd4956e5b] Moved copy/rename/hardLink methods from SSTableWriter to SSTable
[1ccc6bf148] Create generic SSTableBuilder and IOOptions
[da58a81102] Refactor SSTableReaderBuilder
[4501ddba1c] Refactor ColumnIndex
[d4f9e1a64b] Extracted non-big-table-specific functionality from BigTableWriter to SortedTableWriter
[379525d01e] Refactor BigTableZeroCopyWriter to SSTableZeroCopyWriter as it is not specific to big format
[8ac37f83bc] Extract EmptySSTableScanner out from BigTableScanner
[ee6673f1cf] Implement SSTableWriterBuilder
[bb26629235] Refactor opening early / final
[a327595015] Refactored SSTableWriter factory
[16ffd7334b] Extract non-big-format-specific logic from scrubber and verifier
[75e02db6af] Allow to specify the default SSTableFormat via system property
[a7b9d0d628] Small fixes around streaming
[407f977c36] Move guard collection size
[0529e57d2f] Remove explicit references to big format
[61509963ec] Unclassified minor changes
[da28d1af3a] Replaced getCreationTimeFor(Component) with getDataCreationTime()
[e99c834de6] !!! Reformatting
[882b7baa5a] Rename SSTableReader.maybePresent and fix its redundant usages
[b70c983bea] Implement mmapped region extension for compressed data
[d7ff3970de] Introduce SSTable.Owner interface
[e9feb9c462] Replaced getCreationTimeFor(Component) with getDataCreationTime()
[ee8082fb07] Created SSTableFormat.deleteOrphanedComponents
[e62950fd3d] Refactor metrics further
[cefa5b3814] Extract key cache support into separate entity
[dd55101ca1] Extracted SSTableReaderWithFilter
[510b651824] Implement customizable component types
[2be512d9fa] Pluggable SSTableFormat by making SSTableFormat.Type not an enum
[670836b55d] Refactor CRC and digest validators
[00c91103bc] Extract delete method to delete SSTables and purge row cache entries
[0819dc9fc2] Extracted trySkipFileCacheBefore(key) to SSTableReader
[732f841750] Added missing overrides in ForwardingSSTableReader
[db623218fd] Update DatabaseDescriptorRefTest
[c018c468e5] Cleanup
[eafc836242] Add @SuppressWarnings("resource") where needed
[3b7c911dd6] Documentation

patch by Jacek Lewandowski, reviewed by Branimir Lambov for CASSANDRA-17056

Co-authored-by: @jacek-lewandowski
Co-authored-by: @blambov
2023-03-06 09:17:18 +01:00
Ekaterina Dimitrova d1e3c781b5 Add JDK17 startup scripts
patch by Ekaterina Dimitrova; reviewed by Mick Semb Wever for CASSANDRA-18258
2023-02-27 12:06:44 -05:00
Ekaterina Dimitrova a0ec0ae303 Remove scripted UDFs, remove related tests or rewrite some tests to create java UDFs instead, where it makes sense
patch by Ekaterina Dimitrova; reviewed by Michael Semb Wever for CASSANDRA-18252
2023-02-12 10:18:29 -05:00
Brandon Williams bcaa1dca0b Fix typo in cassandra.yaml CASSANDRA-18209 2023-01-31 06:32:24 -06:00
Nikita Eshkeev f27790c969 Improve and clean up documentation and fix typos
This patch includes all the changes from the PRs that introduce small
changes related to typos and similar in the documentation. The changes are
accumulated from the following PRs:

- https://github.com/apache/cassandra/pull/206
- https://github.com/apache/cassandra/pull/359
- https://github.com/apache/cassandra/pull/366
- https://github.com/apache/cassandra/pull/390
- https://github.com/apache/cassandra/pull/450
- https://github.com/apache/cassandra/pull/567
- https://github.com/apache/cassandra/pull/615
- https://github.com/apache/cassandra/pull/618
- https://github.com/apache/cassandra/pull/746
- https://github.com/apache/cassandra/pull/984
- https://github.com/apache/cassandra/pull/1052
- https://github.com/apache/cassandra/pull/1088
- https://github.com/apache/cassandra/pull/1274
- https://github.com/apache/cassandra/pull/1378
- https://github.com/apache/cassandra/pull/1404
- https://github.com/apache/cassandra/pull/1504
- https://github.com/apache/cassandra/pull/1540
- https://github.com/apache/cassandra/pull/1544
- https://github.com/apache/cassandra/pull/1673
- https://github.com/apache/cassandra/pull/1697
- https://github.com/apache/cassandra/pull/1722
- https://github.com/apache/cassandra/pull/1815
- https://github.com/apache/cassandra/pull/1830
- https://github.com/apache/cassandra/pull/1863
- https://github.com/apache/cassandra/pull/1865
- https://github.com/apache/cassandra/pull/1879
- https://github.com/apache/cassandra/pull/2062

patch by Nikita Eshkeev, reviewed by Stefan Miklosovic, Lorina Poland, Michael Semb Wever for CASSANDRA-18185

Co-authored-by: kalmant <kalmant@users.noreply.github.com>
Co-authored-by: Dmitry <xotonic@yandex.ru>
Co-authored-by: Tibor Répási <rtib@users.noreply.github.com>
Co-authored-by: Tzach Livyatan <tzach@scylladb.com>
Co-authored-by: Jérôme BAROTIN <jeromebarotin@gmail.com>
Co-authored-by: Giorgio Giuffrè <giorgiogiuffre23@gmail.com>
Co-authored-by: Siddhartha Tiwari <201851127@iiitvadodara.ac.in>
Co-authored-by: Angelo Polo <language.devel@gmail.com>
Co-authored-by: Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com>
Co-authored-by: 陳傑夫 <chienfuchen32@gmail.com>
Co-authored-by: Bhouse99 <bhouse99@protonmail.com>
Co-authored-by: Matthew Hardwick <MatthewRHardwick@gmail.com>
Co-authored-by: Paul Wouters <paul.wouters@aiven.io>
Co-authored-by: Romain Hardouin <romain_hardouin@yahoo.fr>
Co-authored-by: Guilherme Poleto <gpoleto@alunos.utfpr.edu.br>
Co-authored-by: 陳傑夫 <chienfuchen32@gmail.com>
Co-authored-by: etc-crontab <jujut@free.fr>
Co-authored-by: Prashant Bhuruk <prashantbhuruk88@gmail.com>
Co-authored-by: Jingchuan Zhu <56401528+codingswag998@users.noreply.github.com>
Co-authored-by: Ryan Stewart <ryan.stewart@rackspace.com>
Co-authored-by: utkarsh-agrawal-jm <107914361+utkarsh-agrawal-jm@users.noreply.github.com>
Co-authored-by: Ben Dalling <b.dalling@locp.co.uk>
Co-authored-by: Terry L. Blessing <tlblessing1@gmail.com>
Co-authored-by: gruzilkin <gruzmob@gmail.com>
Co-authored-by: Kevin <kevin.xgr@gmail.com>
Co-authored-by: yziadeh <121903189+yziadeh@users.noreply.github.com>
Co-authored-by: Lorina Poland <lorina@datastax.com>
Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-01-26 14:42:47 +01:00
Mick Semb Wever 8413e9d6fd
Merge branch 'cassandra-4.1' into trunk
* cassandra-4.1:
  Update G1GC settings, and make it default in trunk
2023-01-20 13:16:07 +01:00
Mick Semb Wever 7c86e18baf
Update G1GC settings, and make it default in trunk
patch by Mick Semb Wever; patch by Anthony Grasso, Brandon Williams, Derek Chen-Becker, Jeremiah Jordan, Jon Haddad, Josh McKenzie  for CASSANDRA-18027
2023-01-20 13:08:46 +01:00
ben b07c3127cc SimpleSeedProvider can resolve multiple IP addresses per DNS record
patch by Ben Bromhead; reviewed by Stefan Miklosovic and Andrés de la Peña for CASSANDRA-14361

Co-authored-by: Stefan Miklosovic <smiklosovic@apache.org>
2023-01-18 10:43:45 +01:00
David Capwell 7df4530882 Merge branch 'cassandra-4.1' into trunk 2023-01-12 09:48:04 -08:00
David Capwell 5be1038c5d Streaming progress virtual table lock contention can trigger TCP_USER_TIMEOUT and fail streaming
patch by David Capwell; reviewed by Abe Ratnofsky, Jon Meredith for CASSANDRA-18110
2023-01-12 09:46:54 -08:00
Stefan Miklosovic 797b96958a Implement a guardrail for not having zero default_time_to_live on tables with TWCS
patch by Stefan Miklosovic; reviewed by Andrés de la Peña, Josh McKenzie, Brandon Williams and Brad Schoening for CASSANDRA-18042

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2022-12-02 09:45:02 +01:00
maxwellguo ee8b66da8c Make incremental backup configurable per table
patch by Maxwell Guo; reviewed by Stefan Miklosovic and Benjamin Lerer for CASSANDRA-15402
2022-11-19 10:57:54 +01:00
Andrés de la Peña 9f99e72aae Add reasons to guardrail messages and consider guardrails in the error message for needed ALLOW FILTERING
* Add optional reason for guarding an operation to every guardrail

* Add reason for disabling ALLOW FILTERING into cassandra.yaml

* Consider allow_filtering_enabled guardrail in the error message for needed ALLOW FILTERING

patch by Andrés de la Peña; reviewed by Berenguer Blasi and Josh McKenzie for CASSANDRA-17967
2022-11-18 13:08:31 +00:00
Jyothsna Konisa 36e16ee3c9 Adding endpoint verification option to client_encryption_options
patch by Jyothsna Konisa; reviewed by Jon Meredith, Yifan Cai for CASSANDRA-18034
2022-11-15 16:06:21 -08:00
Mick Semb Wever 0778ae362c
Merge branch 'cassandra-4.1' into trunk
* cassandra-4.1:
  Restore streaming_keep_alive_period functionality on the netty control streaming channel
2022-11-09 11:47:16 +01:00
Aleksey Yeschenko c100d34a1a
Restore streaming_keep_alive_period functionality on the netty control streaming channel
patch by Aleksey Yeschenko, Mick Semb Wever; reviewed by Mick Semb Wever, Berenguer Blasi for CASSANDRA-17768

Co-authored-by: Aleksey Yeschenko <aleksey@apache.org
Co-authored-by: Mick Semb Wever <mck@apache.org>
2022-11-09 11:39:07 +01:00
Abe Ratnofsky 230fe8e647 Include Git SHA in --verbose flag for nodetool version
Patch by Abe Ratnofsky; review by Brandon Williams, Caleb Rackliffe, Michael Semb Wever and Stefan Miklosovic for CASSANDRA-17753
2022-10-25 21:28:29 +02:00
Abe Ratnofsky b2660bcf78
Fix JMX security vulnerabilities
patch by Abe Ratnofsky; reviewed by Jon Meredith, Mick Semb Wever, Sam Tunnicliffe for CASSANDRA-17921
2022-10-18 22:47:49 +02:00
Stefan Miklosovic c089818881 Make Cassandra logs able to be viewed in the virtual table system_views.system_logs
patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17948
2022-10-18 14:13:51 +02:00
Caleb Rackliffe d6aee7e08c Optionally avoid hint transfer during decommission
patch by Caleb Rackliffe; reviewed by Jon Meredith and Stefan Miklosovic for CASSANDRA-17808
2022-09-08 16:35:09 -05:00
Andrés de la Peña 4b7069c06c Add guardrail for column size
patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova and David Capwell for CASSANDRA-17151
2022-08-16 17:33:01 +01: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
Ekaterina Dimitrova 62ac5da78a Merge branch 'cassandra-4.1' into trunk 2022-08-01 20:43:08 -04:00
Ekaterina Dimitrova dd08314ed6 Uncomment prepared_statements_cache_size, key_cache_size, counter_cache_size, index_summary_capacity which were
commented out by mistake in a previous patch;
Fix breaking change with cache_load_timeout; cache_load_timeout_seconds <=0 and cache_load_timeout=0 are equivalent
and they both mean disabled;
Deprecate public method setRate(final double throughputMbPerSec) in Compaction Manager in favor of
setRateInBytes(final double throughputBytesPerSec);
Revert breaking change removal of StressCQLSSTableWriter.Builder.withBufferSizeInMB(int size). Deprecate it in favor
of StressCQLSSTableWriter.Builder.withBufferSizeInMiB(int size);
Fix precision issues, add new -m flag (for nodetool/setstreamthroughput, nodetool/setinterdcstreamthroughput,
nodetool/getstreamthroughput and nodetoo/getinterdcstreamthroughput), add new -d flags (nodetool/getstreamthroughput,
 nodetool/getinterdcstreamthroughput, nodetool/getcompactionthroughput);
Fix a bug with precision in nodetool/compactionstats;
Deprecate StorageService methods and add new ones for stream_throughput_outbound, inter_dc_stream_throughput_outbound,
compaction_throughput_outbound in the JMX MBean `org.apache.cassandra.db:type=StorageService`;
Removed getEntireSSTableStreamThroughputMebibytesPerSec in favor of new getEntireSSTableStreamThroughputMebibytesPerSecAsDouble
in the JMX MBean `org.apache.cassandra.db:type=StorageService`;
Removed getEntireSSTableInterDCStreamThroughputMebibytesPerSec in favor of getEntireSSTableInterDCStreamThroughputMebibytesPerSecAsDouble
in the JMX MBean `org.apache.cassandra.db:type=StorageService`

Patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, Francisco Guerrero for CASSANDRA-17225
2022-08-01 19:05:13 -04:00
Ekaterina Dimitrova b94bf3f218 Merge branch 'cassandra-4.1' into trunk 2022-07-29 13:35:55 -04:00
Ekaterina Dimitrova fe28f482db Fix sstable_preemptive_open_interval_in_mb disabled value - backward compatibility
patch by Ekaterina Dimitrova; reviewed by Andres de la Pena and Jon Meredith for CASSANDRA-17737
2022-07-29 13:26:31 -04:00
Ekaterina Dimitrova d2d6afb8e9 Merge branch 'cassandra-4.1' into trunk 2022-07-25 10:19:55 -04:00
Ekaterina Dimitrova 1c70149ef5 Fix Settings Virtual Table to update paxos_variant after startup and rename enable_uuid_sstable_identifiers to uuid_sstable_identifiers_enabled as per our config naming conventions
patch by Ekaterina Dimitrova; reviewed by Brandon Williams for CASSANDRA-17738
2022-07-25 10:08:09 -04:00
Josh McKenzie 91b86487fe Add guardrail to disallow DROP KEYSPACE commands for non superuser accounts
Patch by Josh McKenzie; reviewed by Aleksey Yeschenko for CASSANDRA-17767
2022-07-22 12:19:49 -04:00
Ekaterina Dimitrova 66177be587 Merge branch 'cassandra-4.1' into trunk 2022-07-22 09:48:15 -04:00
Ekaterina Dimitrova 9beeaf87bd Merge branch 'cassandra-4.0' into cassandra-4.1 2022-07-22 09:41:38 -04:00
Savni Nagarkar 39e89fd636 Add guardrail for maximum replication factor
Patch by Savni Nagarkar; reviewed by Andrés de la Peña, David Capwell and Josh McKenzie for CASSANDRA-17500
2022-06-23 15:53:33 +01:00
Yifan Cai 99d034a224 Option to disable CDC on SSTable repair
patch by Yifan Cai; reviewed by Josh McKenzie for CASSANDRA-17666
2022-06-07 11:30:49 -07:00
Josh McKenzie 14fbab15bd Add guardrail to allow disabling SimpleStrategy
Patch by Josh McKenzie; reviewed by Aleksey Yeschenko for CASSANDRA-17647
2022-05-26 15:06:58 -04:00
Jyothsna Konisa ed3901823a Adding support for TLS client authentication for internode communication
patch by Jyothsna Konisa; reviewed by Bernardo Botella, Francisco Guerrero, Jon Meredith, Maulin Vasavada, Yifan Cai for CASSANDRA-17513
2022-05-24 13:13:25 -07:00
Ekaterina Dimitrova c0b175595d Merge branch 'cassandra-4.1' into trunk 2022-05-20 14:36:46 -04:00
Ekaterina Dimitrova a67a2a2441 Handle config parameters upper bound on startup; Fix auto_snapshot_ttl and paxos_purge_grace_period min unit validations
patch by Ekaterina Dimitrova and Andres de la Pena; reviewed by Andres de la Pena and Caleb Rackliffe for CASSANDRA-17571

Co-authored-by: Ekaterina Dimitrova <ekaterina.dimitrova@datastax.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2022-05-20 14:27:20 -04:00
Josh McKenzie ce515a3d77 Add guardrail for ALTER TABLE ADD / DROP / REMOVE column operations
Patch by Josh McKenzie; reviewed by Jon Meredith for CASSANDRA-17495
2022-05-09 12:21:39 -04:00
Josh McKenzie 030831c5f5 Rename truncate_drop guardrail to drop_truncate_table
Patch by Josh McKenzie; reviewed by Andres de la Pena for CASSANDRA-17592
2022-05-06 11:48:45 -04:00
Paulo Motta 7741eacc54 Add auto_snapshot_ttl configuration
Patch by Paulo Motta; Reviewed by Stefan Miklosovic for CASSANDRA-16790

Co-authored-by: fibersel <0583463@gmail.com>
2022-04-30 17:28:17 -03: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
Stefan Miklosovic bd36cb9f6b implement startup check to prevent Cassandra to potentially spread zombie data
patch by Stefan Miklosovic; reviwed by Paulo Motta and Brandon Williams for CASSANDRA-17180
2022-04-29 13:22:51 +02:00
Savni Nagarkar da7c662227 Migrate threshold for minimum keyspace replication factor to guardrails
patch by Savni Nagarkar; reviewed by Andres de la Peña, David Capwell for CASSANDRA-17212
2022-04-28 20:14:36 -07:00
Stefan Miklosovic 2180a34bbb Revert "Add a system property to set hostId if not yet initialized"
This reverts commit 33ff36cc42.

patch by Stefan Miklosovic; reviewed by Brandon Williams and Sam Tunnicliffe for CASSANDRA-14582
2022-04-28 15:09:46 +02:00
Josh McKenzie 6bd373f5d2 Add guardrail to disallow TRUNCATE and DROP TABLE commands
Patch by Josh McKenzie; reviewed by Aleksey Yeschenko for CASSANDRA-17558
2022-04-27 11:52:24 -04:00
Bhouse99 381c2a4fa8 add plugin support for CQLSH
patch by Brian Houser; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-16456
2022-04-27 12:35:04 +02:00
Savni Nagarkar f444c40286 Add guardrail to disallow querying with ALLOW FILTERING
patch by Savni Nagarkar; reviewed by Andres de la Peña, David Capwell and Josh McKenzie for CASSANDRA-17370
2022-04-26 18:26:17 +01:00
Andrés de la Peña b3842de5cf Add guardrail for data disk usage
patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova and Stefan Miklosovic for CASSANDRA-17150

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Zhao Yang <jasonstack.zhao@gmail.com>
Co-authored-by: Eduard Tudenhoefner <etudenhoefner@gmail.com>
2022-04-22 16:36:07 +01:00
David Capwell 7db3285e7b Migrate track_warnings to more standard naming conventions and use latest configuration types rather than long
patch by David Capwell; reviewed by Andres de la Peña, Caleb Rackliffe for CASSANDRA-17560
2022-04-21 14:32:25 -07:00
Josh McKenzie 72af1f75fc Add guardrail for GROUP BY queries
Patch by Josh McKenzie; reviewed by David Capwell and Andres de la Pena for CASSANDRA-17509
2022-04-13 11:04:08 -04:00
Savni Nagarkar 20175bf77e Remove guardrails global enable flag
patch by Savni Nagarkar; reviewed by Andrés de la Peña and Joshua McKenzie for CASSANDRA-17499
2022-04-12 11:28:55 +01:00
Josh McKenzie 910bbb9b5f Add guardrail to disallow creation of secondary indexes
Patch by Josh McKenzie; reviewed by Chris Lohfink for CASSANDRA-17498
2022-04-07 15:53:23 -04:00
Josh McKenzie 105d69fdc5 Add guardrail to disallow creation of uncompressed sstables
Patch by Josh McKenzie; reviewed by David Capwell for CASSANDRA-17504
2022-04-07 15:33:34 -04:00
Brad Schoening 9711cd33c4 remove support for deprecated version specific TLS in Python 3.6
patch by Brad Schoening; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17365
2022-04-06 14:01:47 +02:00
Andrés de la Peña 8a3b9260a9 Add guardrail for the number of fields per UDT
patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova for CASSANDRA-17385
2022-03-28 17:50:15 +01:00
Jacek Lewandowski 0040fea379 Implement sstable generation identifier as uuid
Patch by Jacek Lewandowski; reviewed by Andrés de la Peña, Benjamin Lerer and Dan Jatnieks for CASSANDRA-17048
2022-03-23 11:50:33 +00:00
Caleb Rackliffe 4ea3e4c505 Add native transport rate limiter options to example cassandra.yaml, and expose metric for dispatch rate
patch by Caleb Rackliffe; reviewed by Josh McKenzie for CASSANDRA-17423
2022-03-21 11:39:28 -05:00
Andrés de la Peña 143a5e8b06 Add diagnostic events for guardrails
patch by Andrés de la Peña; reviewed by Berenguer Blasi and Stefan Miklosovic for CASSANDRA-17197

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Aleksandr Sorokoumov <aleksandr.sorokoumov@gmail.com>
2022-03-21 15:52:25 +00:00
Andrés de la Peña 935bcf1e87 Add guardrails for collection items and size
patch by Andrés de la Peña; reviewed by Berenguer Blasi for CASSANDRA-17153
2022-03-15 13:31:41 +00:00
Andrés de la Peña a41040ccdc Add guardrails for read/write consistency levels
patch by Andrés de la Peña; reviewed by Caleb Rackliffe for CASSANDRA-17188

Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Aleksandr Sorokoumov <aleksandr.sorokoumov@gmail.com>
2022-03-11 15:36:39 +00:00
Andrés de la Peña 3233c82311 Add guardrail for SELECT IN terms and their cartesian product
patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova for CASSANDRA-17187

Co-authored-by: Aleksandr Sorokoumov <aleksandr.sorokoumov@gmail.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
2022-03-08 11:08:29 +00:00
Stefan Miklosovic eac9d92562 make startup checks configurable
patch by Stefan Miklosovic; reviewed by Paulo Motta for CASSANDRA-17220
2022-02-28 00:36:53 +01:00
Yifan Cai b83da7d978 Correct size unit to mebibypes 2022-02-25 14:38:43 -08:00
tejavadali 7ea0a4aa41 Add guardrail for number of partition keys on IN queries
patch by Krishna Vadali; reviewed by Andrés de la Peña and Berenguer Blasi for CASSANDRA-17186
2022-02-23 12:47:27 +00: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
Andrés de la Peña 8e1c8f9863 Flatten guardrails config
patch by Andrés de la Peña; reviewed by David Capwell for CASSANDRA-17353
2022-02-09 18:31:37 +00:00
Ekaterina Dimitrova 9f56bf4ca7 Remove old Duration class in favor of DurationSpec class
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:39:53 -05: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 6d5203615f Transfer parameters to the newly introduced configuration framework (7)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:48 -05:00
Ekaterina Dimitrova 23138252f2 Transfer parameters to the newly introduced configuration framework (6)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:40 -05:00
Ekaterina Dimitrova 1315d0c96f Transfer parameters to the newly introduced configuration framework (5)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:32 -05:00
Ekaterina Dimitrova ed48f3c017 Transfer parameters to the newly introduced configuration framework (4)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:23 -05:00
Ekaterina Dimitrova 755fd9446b Transfer parameters to the newly introduced configuration framework (3)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:14 -05:00
Ekaterina Dimitrova d85f7f7c2d Transfer parameters to the newly introduced configuration framework (2)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:28:04 -05:00
Ekaterina Dimitrova b9e2ab75f8 Extend DurationSpec and DataStorageSpec for smallest unit and transfer denylist parameters to the new framework
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:27:47 -05:00
Ekaterina Dimitrova a3258d66bc Transfer parameters to the newly introduced configuration framework (1)
patch by Ekaterina Dimitrova; reviewed by Caleb Rackliffe, David Capwell, Michael Semb Wever and Benjamin Lerer for CASSANDRA-15234
2022-02-05 22:27:37 -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
Stefan Miklosovic da47849b50 Remove Windows-specific classes and related code
patch by Stefan Miklosovic; reviewed by Joshua McKenzie, Bowen Song, Berenguer Blasi for CASSANDRA-16956
2022-02-05 15:41:33 +01:00
Caleb Rackliffe 28eea6e8cd Runtime-configurable YAML option to prohibit USE statements
patch by Caleb Rackliffe; reviewed by David Capwell for CASSANDRA-17318
2022-02-04 14:24:51 -06:00
Josh McKenzie 89c6addb50 Prewarm role and credentials caches to avoid timeouts at startup
Patch by Blake Eggleston; reviewed by Sam Tunnicliffe, Jason Brown, and Caleb Rackliffe for CASSANDRA-16958

Co-authored by: Blake Eggleston <bdeggleston@gmail.com>
Co-authored by: Josh McKenzie <jmckenzie@apache.org>
2022-01-13 15:45:19 -05:00
Andrés de la Peña 95522f85d5 Add guardrail for list operations that require read before write
patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova for CASSANDRA-17154
2021-12-17 16:50:20 +00:00
Andrés de la Peña bae92ee139 Migrate thresholds for number of keyspaces and tables to guardrails
This adds a new guardrail for limiting the number of keyspaces. It also  marks the previous not-guardrail thresholds
for keyspaces and tables as deprecated in favour of the equivalent guardrails. GuardrailsOptions is modified to always
log updates on guardrails config. A small refactor decouples guardrails from their configuration interfaces.

patch by Andrés de la Peña; reviewed by Ekaterina Dimitrova for CASSANDRA-17195
2021-12-17 16:33:00 +00:00
Kowalczyk bf1446cd85 Add guardrail for query page size
patch by Bartlomiej; reviewed by Andrés de la Peña and Brandon Williams for CASSANDRA-17189
2021-12-16 17:20:58 +00:00
Joseph Lynch 97b47c3b5f Merge branch 'cassandra-4.0' into trunk 2021-12-09 10:31:39 -05:00
Joseph Lynch e73d05bf85 Merge branch 'cassandra-3.11' into cassandra-4.0 2021-12-09 10:29:08 -05:00
Joseph Lynch 1fce84f983 Merge branch 'cassandra-3.0' into cassandra-3.11 2021-12-09 10:26:00 -05:00
Venkata Harikrishna Nukala 1911a887e8 Fix slow keycache load which blocks startup for tables with many sstables.
Patch by Venkata Harikrishna Nukala; reviewed by Marcus Eriksson and Joseph Lynch for CASSANDRA-14898
2021-12-09 10:14:16 -05:00
Andrés de la Peña 7871a28542 Add guardrails framework prototype
patch by Andrés de la Peña; reviewed by David Capwell and Stefan Miklosovic for CASSANDRA-17147

Co-authored-by: Sylvain Lebresne <lebresne@gmail.com>
Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com>
Co-authored-by: Aleksandr Sorokoumov <aleksandr.sorokoumov@gmail.com>
Co-authored-by: Zhao Yang <jasonstack.zhao@gmail.com>
Co-authored-by: Jakub Żytka <jakub.zytka@datastax.com>
2021-12-03 15:20:20 +00:00
Ekaterina Dimitrova 670bcff596 Merge branch 'cassandra-4.0' into trunk 2021-11-16 15:08:54 -05:00
Ekaterina Dimitrova 44ace88585 internode_send_buff_size_in_bytes and internode_recv_buff_size_in_bytes have new names. Backward compatibility with the old names added
patch by Ekaterina Dimitrova; reviewed by David Capwell for CASSANDRA-17141
2021-11-16 14:34:04 -05:00
Brandon Williams be9db0980b Rename cassandra-topology.properties to example
Patch by brandonwilliams; reviewed by bereng for CASSANDRA-16912
2021-11-16 10:10:15 -06:00
Ekaterina Dimitrova f61d817cb5 Merge branch 'cassandra-4.0' into trunk 2021-11-16 10:37:53 -05:00
Ekaterina Dimitrova b6f61e850c Remove unused configuration parameters from cassandra.yaml
patch by Ekaterina Dimitrova; reviewed by Berenguer Blasi for CASSANDRA-17132
2021-11-16 10:30:52 -05:00
Ekaterina Dimitrova 4f112af615 Merge branch 'cassandra-4.0' into trunk 2021-11-10 16:41:48 -05:00
Ekaterina Dimitrova 4bb6f411d8 Fix cassandra.yaml formatting of parameters
patch by Ekaterina Dimitrova; reviewed by Josh McKenzie for CASSANDRA-17131
2021-11-10 16:36:59 -05:00
Brandon Williams e0954fa1a8 Revert "Rename cassandra-topology.properties to cassandra-topology.properties.example"
This reverts commit 29aa088ab6.
2021-11-10 14:27:55 -06:00
Francisco Guerrero 77dde2a3c4 Introduce separate rate limiting settings for entire SSTable streaming
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Marcus Eriksson, Yifan Cai for CASSANDRA-17065
2021-11-10 10:35:01 -08:00
Bereng 29aa088ab6 Rename cassandra-topology.properties to cassandra-topology.properties.example
Patch by bereng; reviewed by brandonwilliams for CASSANDRA-16912
2021-11-10 11:17:31 -06:00
Blake Eggleston eae7b9c3ad Actively update auth caches in the background
Patch by Blake Eggleston; reviewed by Sam Tunnicliffe, Jason Brown, and Caleb Rackliffe for CASSANDRA-16957

Co-authored-by: Blake Eggleston <bdeggleston@gmail.com>
Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
2021-11-09 15:32:36 -05:00
dcapwell 5b4d369266
coordinator_read_size had wrong name in cassandra.yaml
patch by Ekaterina Dimitrova, reviewed by David Capwell for CASSANDRA-17118
2021-11-03 15:32:40 -07:00
Josh McKenzie ab920c3031 Add a Denylist to block reads and writes on specific partition keys
Patch by Josh McKenzie, reviewed by Aleksei Zotov and Sumanth Pasupuleti for CASSANDRA-12106

Co-authored by Josh McKenzie <jmckenzie@apache.org>
Co-authored by Sam Overton
2021-11-01 12:43:51 -04:00
kurt b2ccd0f3f5 ensure hint window is persistent across restarts of a node
patch by Kurt Greaves; reviewed by Brandon Williams, Mick Semb Wever and Stefan Miklosovic for CASSANDRA-14309
2021-10-22 17:23:06 +02:00
Sumanth Pasupuleti 5fdadb25f9 add default_keyspace_rf and minimum_keyspace_rf configuration options
Patch by Sumanth Pasupuleti; reviewed by Jaydeepkumar Chovatia, Alex Petrov, Stefan Miklosovic and Alexander Zotov for CASSANDRA-14557.
2021-10-13 10:15:24 +02:00
Bowen Song 917d74bd35 add credentials file support for CQLSH
patch by Bowen Song; reviewed by Brian Houser, Stefan Miklosovic and Brandon Williams for CASSANDRA-16983
2021-10-11 18:33:16 +02:00
Josh McKenzie 5ab15316e1 Allow reverse iteration order during resource permissions checking
Patch by Sam Tunnicliffe; reviewed by Blake Eggleston, Jeff Jirsa, and Aleksei Zotov for CASSANDRA-17016

Co-authored by Sam Tunnicliffe <sam@beobal.com>
Co-authored by Josh McKenzie <jmckenzie@apache.org>
2021-10-08 08:49:42 -04:00
Bereng 6e35f30f66 Merge branch 'cassandra-4.0' into trunk 2021-09-30 07:48:44 +02:00
Bereng 42905e94b5 Merge branch 'cassandra-3.11' into cassandra-4.0 2021-09-30 07:47:16 +02:00
Bereng 7c067b6d7d Add indication in cassandra.yaml that rpc timeouts going too high will cause memory build up
patch by Berenguer Blasi, Jeremy Hanna; reviewed by Andres de la Peña for CASSANDRA-8969

Co-authored-by: Berenguer Blasi <berenguerblasi@gmail.com>
Co-authored-by: Jeremy Hanna <jeromatron@gmail.com>
2021-09-30 07:38:40 +02:00
David Capwell c7526f943f Add soft/hard limits to local reads to protect against reading too much data in a single query
patch by David Capwell; reviewed by Caleb Rackliffe and Marcus Eriksson for CASSANDRA-16896
2021-09-28 12:49:12 -05:00
Josh McKenzie 9f15ec6de1 Evaluate consistency levels of auth reads
Patch by Jason Brown; reviewed by Matthew Byrd, Sankalp Kohli, and Benjamin Lerer for CASSANDRA-12988

Co-authored by Jason Brown (jasedbrown@gmail.com)
Co-authored by Josh McKenzie (jmckenzie@apache.org)
2021-09-24 11:15:59 -04:00
Brandon Williams 08444cbc3f Reduce max native frame size to 16MB
Patch by brandonwilliams; reviewed by blerer for CASSANDRA-16886
2021-09-09 14:20:19 -05:00
David Capwell 4ec4ab992f Add client warnings and abort to tombstone and coordinator reads which go past a low/high watermark
patch by David Capwell; reviewed by Blake Eggleston, Marcus Eriksson for CASSANDRA-16850
2021-08-26 13:41:31 -07:00
David Capwell 4b3f07fc74 allow blocking IPs from updating metrics about traffic
patch by David Capwell; reviewed by Benjamin Lerer, Caleb Rackliffe, Jon Meredith for CASSANDRA-16859
2021-08-20 17:24:16 -07:00
Yifan Cai 8acbbe042b Background schedule to clean up orphaned hints files
patch by Yifan Cai; reviewed by Brandon Williams, Chris Lohfink for CASSANDRA-16815
2021-08-10 21:48:16 -07:00
Marcus Eriksson 296f65e8d1 Log when compacting many tombstones
Patch by marcuse; reviewed by Brandon Williams for CASSANDRA-16780
2021-07-02 09:36:06 +02:00
Brandon Williams 4c4e84fe78 Merge branch 'cassandra-4.0' into trunk 2021-06-29 16:00:11 -05:00
Brandon Williams 96884ee705 Merge branch 'cassandra-3.11' into cassandra-4.0 2021-06-29 15:59:50 -05:00
Brandon Williams c3ae22d654 Merge branch 'cassandra-3.0' into cassandra-3.11 2021-06-29 15:58:38 -05:00
Brandon Williams 2d8b304e75 Ninja fix comments saying mx4j defaults to 0.0.0.0
CASSANDRA-13574
2021-06-29 15:57:55 -05:00
Benjamin Lerer c9130d454c Merge branch cassandra-4.0 into trunk 2021-06-18 15:17:52 +02:00
Benjamin Lerer bdb7c3b377 Merge branch cassandra-3.11 into cassandra-4.0.0 2021-06-18 15:11:27 +02:00
Benjamin Lerer 91c12bd750 Merge branch cassandra-3.0 into cassandra-3.11 2021-06-18 14:53:54 +02:00
Benjamin Lerer 9b6dd382bd Add flag to disable ALTER...DROP COMPACT STORAGE statements
patch by Benjamin Lerer; review by Andres de la Pena and Brandon Williams for CASSANDRA-16733
2021-06-18 14:42:48 +02:00
fibersel 33ff36cc42 Add a system property to set hostId if not yet initialized
patch by Abi Palagashvili; reviewed by Stefan Miklosovic and Paulo Motta for CASSANDRA-14582
2021-06-07 21:01:44 +02:00
Ekaterina Dimitrova 658f3e11a6 Improve AuditLogging documentation and logback.xml
authored by Ekaterina Dimitrova, reviewed by Sarma Pydipally, Brandon Williams for CASSANDRA-16682
2021-05-21 14:42:53 -04:00
Mick Semb Wever 7337fc0ab4
Merge branch 'cassandra-3.11' into trunk 2021-04-19 17:39:10 +02:00
Mick Semb Wever 2ec96ae669
Merge branch 'cassandra-3.0' into cassandra-3.11 2021-04-19 17:34:05 +02:00
Sam Tunnicliffe dd6c261119 Add io.netty.tryReflectionSetAccessible=true to j11 server options in order to enable netty to use Unsafe direct byte buffer construction
Patch by Sam Tunnicliffe; reviewed by Brandon Williams, Ekaterina Dimitrova and Berenguer Blasi for CASSANDRA-16493
2021-03-19 17:36:13 -04:00
Jeff Widman 3d539d908f Update python2 doc references to point to py3
Patch by Jeff Widman; reviewed by brandonwilliams for CASSANDRA-16505
2021-03-09 17:15:07 -06:00
Yifan Cai 425f750a6f Document the side-effect of Zero Copy Streaming when using multiple data directories 2021-02-26 09:42:54 -08:00
Benjamin Lerer f69b11eee9 Improve system tables handling in case of disk failures
patch by Benjamin Lerer; reviewed by Andrés de la Peña and  Marcus
Eriksson for CASSANDRA-14793
2021-02-04 15:04:22 +01:00
Adam Holmberg 023eecb03a
Fix check for -Xlog in cassandra-env.sh
patch by Yakir Gibraltar; reviewed by Adam Holmberg, Mick Semb Wever for CASSANDRA-16279
2021-01-08 22:06:23 +01:00
Jeremy Hanna 3cfc8502b8
Updated default num_tokens from 256 to 16 with associated allocate_tokens_for_local_replication_factor set to 3
patch by Jeremy Hanna; reviewed by Alexander Dejanovski, Paulo Motta, Brandon Williams, Michael Semb Wever for CASSANDRA-13701
2020-12-17 22:18:17 +01:00
Benjamin Lerer 0d56f70ae7 Remove use of String.intern()
patch by Benjamin Lerer; reviewed by Brandon Williams for CASSANDRA-15810
2020-12-17 17:48:59 +01:00
Marcus Eriksson 786cb11e18 Send back client warning if creating too many tables/keyspaces
Patch by marcuse; reviewed by Alex Petrov, Brandon Williams, Yifan Cai for CASSANDRA-16309
2020-12-15 10:32:43 +01:00
yifan-c c6ea8fabf9 Add dedicated tcp user timeout for streaming connection
patch by Yifan Cai; reviewed by Berenguer Blasi, David Capwell, Adam
Holmberg and by Benjamin Lerer for CASSANDRA-16143
2020-12-09 13:33:33 +01:00
Yuki Morishita d9e2ed00af Remove windows scripts and their references
patch by Yuki Morishita; reviewed by Berenguer Blasi and Andrés de la Peña for CASSANDRA-16171
2020-12-02 16:43:45 +00:00
Sam Tunnicliffe a7c4ba9eee Improve checksumming and compression in protocol V5
This reverts the changes made to the native protocol V5 wire format in
CASSANDRA-13304 and subsequent follow up JIRAs (CASSANDRA-15556 &
CASSANDRA-14716). The framing format has been re-implemented based on the
internode messaging format developed in CASSANDRA-15066.

OPTIONS and STARTUP messages are unframed (i.e. identical to the V4 format).
After sending its response to a STARTUP message, the server modifies the
pipeline and all further messages are sent (and should be expected by the
client to be received) in the format determined by the protocol version of
the STARTUP message.

Patch by Sam Tunnicliffe; reviewed by Alex Petrov and Caleb Rackliffe
for CASSANDRA-15299
2020-12-01 18:49:06 +00:00
Jordan West fae1f88354 Set dynamic snitch default badness threshold to 1.0
Patch by Jordan West; Reviewed by David Capwell for CASSANDRA-16285
2020-11-18 16:04:30 -08:00
Jeff Jirsa 85f69cf394 Add a ratelimiter to snapshot creation and deletion
Patch by Jeff Jirsa; Reviewed by Aleksey Yeschenko, Chris Lohfink,
maxwellguo for CASSANDRA-13019
2020-11-09 15:03:10 +01:00
Zhao Yang 699a1f74fc CASSANDRA-15229: Segregate Network and Chunk Cache BufferPools and Recirculate Partially Freed Chunks
* initiate multiple buffer pool for different lifespan and usages
  - Chunk Cache Buffer Pool - conf.file_cache_size_in_mb=512mb
  - Networking Buffer Pool - conf.temporary_cache_size_in_mb=128mb

* Add overflowSize and usedSize to buffer pool metrics

* re-circulate buffer pool Chunk for ChunkCache whenever it has free space, even thoughput it may not be able to allocate due to fragmentation

patch by Zhao Yang; reviewed by Caleb Rackliffe and Aleksey Yeschenko for CASSANDRA-15229
2020-10-15 22:55:06 +08:00
David Capwell 79e693e16e Add flag to disable chunk cache and disable by default
patch by David Capwell; reviewed by Jon Meredith, Zhao Yang for CASSANDRA-16036
2020-09-29 17:07:07 -07:00
Caleb Rackliffe 292650d968 Merge branch 'cassandra-3.11' into trunk 2020-07-30 14:10:48 +01:00
Caleb Rackliffe 2ef1f1c150 Merge branch 'cassandra-3.0' into cassandra-3.11 2020-07-30 13:27:53 +01:00
Caleb Rackliffe e5c3d08a14 Operational improvements and hardening for replica filtering protection
patch by Caleb Rackliffe; reviewed by Andrés de la Peña for CASSANDRA-15907
2020-07-30 12:53:52 +01:00
Benedict Elliott Smith d8993934e9 Remove BackPressureStrategy
patch by Benedict; reviewed by Sergio Bossa and Robert Stupp for CASSANDRA-15375
2020-07-17 13:39:16 +01:00
Jeremy Hanna 688bb664c5 USING_G1 is incorrectly set in cassandra-env.sh if G1 is explicitly disabled with -UseG1GC
Patch by Jeremy Hanna, reviewed by David Capwell and brandonwilliams for
CASSANDRA-15931
2020-07-08 11:21:56 -05:00
Jeremy Hanna 8599f93d9a
Update compaction_throughput_mb_per_sec default from 16 to 64
patch by Jeremy Hanna; reviewed by Mick Semb Wever for CASSANDRA-14902
2020-07-08 12:10:32 +02:00
Bereng 4654ef09c1
FBUtilities.getJustLocalAddress falls back to lo ip on misconfigured nodes
patch by Berenguer Blasi; reviewed by Robert Stupp, Mick Semb Wever for CASSANDRA-15901
2020-07-07 10:12:12 +02:00
Jeremy Hanna 3cfe3c9f0d
Fail fast when -Xmn is set when the G1 garbage collector is enabled
patch by Jeremy Hanna; reviewed by Anthony Grasso for CASSANDRA-15839
2020-06-24 12:53:53 +02:00
Joseph Lynch 674b6cc1a5 Update defaults for server and client TLS settings
This fixes backwards compatibility with the 3.11 server_encryption_options
while exposing the correct defaults after the 4.0 Netty refactor.

Patch by Joseph Lynch; Reviewed by Ekaterina Dimitrova for CASSANDRA-15262
2020-06-20 18:59:41 -07:00
Sam Tunnicliffe 04533e6cda Avoid blocking AntiEntropyStage when submitting validation requests
Patch by Sam Tunnicliffe; reviewed by Benjamin Lerer for CASSANDRA-15812

Switches ValidationExecutor's work queue to LinkedBlockingQueue to
avoid blocking AntiEntropyStage when the executor is saturated. This
requires VE.corePoolSize to be set to concurrent_validations as now
it will always prefer to queue requests rather than start new threads.

This commit also adds a hard limit on concurrent_validations, as allowing
an unbounded number of validations to run concurrently is never safe.
This was always true, but setting a high value here is now more
dangerous as it controls the number of core, not max, threads.
This hard limit is linked to concurrent_compactors, so operators may
set concurrent_validations between 1 and concurrent_compactors.
The meaning of setting it < 1 has changed from "unbounded" to
"whatever concurrent_compactors is set to".

This safety valve can be overridden with a system property at startup
and/or a JMX property.

CASSANDRA-9292 removed the 1hr timeout on prepare messages, but this
was inadvertently undone when CASSANDRA-13397 was committed. As nothing
long running is done in the repair phase anymore, this timeout can
safely be reduced.

If using RepairCommandPoolFullStrategy.queue, the core pool size
for repairCommandExecutor must be increased from the default
value of 1 or else all concurrent tasks will be queued and no
more threads created.
2020-06-09 13:41:05 +01:00
polandll 57a63f8551 Improving Cassandra configuration docs
* Update copyright date to 2020
* Add glossary
* Rearranged rackdc for better flow
* Add topologies properties file
* Add commitlog_archiving file
* Add logback.xml info
* jvm.options files
* Removed invalid reference to wiki from configuration file

Patch by Lorina Poland; Reviewed by Jon Haddad for CASSANDRA-15822
2020-06-03 11:24:38 -07:00
Stefan Miklosovic dd1c811f87 Provide ability to configure IAuditLogger
Patch by Stefan Miklosovic; reviewed by Vinay Chella and marcuse for CASSANDRA-15748
2020-05-20 16:49:33 +02:00
Joseph Lynch 9c1bbf3ac9 Flush with fast compressors by default
Previously Zstd, Deflate and LZ4HC could hold up the flush thread while
flushing due to their slow compression rates. With this patch we always
default to flush with a fast compressor (default to LZ4) and then
compress into the high compression strategy during normal compactions
that follow. Note that if the existing table compressor is fast (e.g.
LZ4 or Snappy) we use that.

Patch by Joey Lynch; reviewed by Dinesh Joshi for CASSANDRA-15379
2020-04-23 23:23:18 -07:00
Ekaterina Dimitrova 9d2ffad6b6 Set cross_node_timeout to true by default.
Patch by Ekaterina Dimitrova, reviewed by brandonwilliams for
CASSANDRA-15216
2020-01-15 16:35:44 -06:00
Mick Semb Wever 2da9af002a
Merge branch 'cassandra-3.11' into trunk 2020-01-02 11:28:56 +01:00
Mick Semb Wever 1381c875e8
Merge branch 'cassandra-3.0' into cassandra-3.11 2020-01-02 11:27:33 +01:00
Mick Semb Wever 3edbb09e02
Configure the GC logs directory to be the same as other C* log directories, as defined by $CASSANDRA_LOG_DIR
patch by Angelo Polo; reviewed by Mick Semb Wever for CASSANDRA-14306
2020-01-02 11:23:09 +01:00
Per Otterström d5e5c459f5 Align record header of FQL and audit binary log
Patch by Per Otterström; reviewed by Vinay Chella and marcuse for CASSANDRA-15076
2019-11-28 09:43:07 +01:00
Mick Semb Wever 068d2d37c6
Add `allocate_tokens_for_local_rf` yaml option for token allocation that doesn't require keyspace knowledge/existence
patch by Mick Semb Wever; reviewed by Branimir Lambov for CASSANDRA-15260
2019-09-08 20:28:40 +02:00
Michael Shuler d4054e0cf8 ninja: Fix "No newline at end of file" in c*.yaml
After building artifacts, a diff is left over, so let's fix that:

diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 28d86fd10a..e776a5a620 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -1341,4 +1341,4 @@ enable_sasi_indexes: false

 # Enables creation of transiently replicated keyspaces on this node.
 # Transient replication is experimental and is not recommended for production use.
-enable_transient_replication: false
\ No newline at end of file
+enable_transient_replication: false
2019-09-04 10:31:22 -07:00
Alex Petrov 0240a4659d Introduce optional timeouts for idle client sessions
Patch by Alex Petrov, reviewed by Aleksey Yeshchenko for CASSANDRA-11097
2019-07-10 23:02:17 +02: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