Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cassandra Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-cassandra-knowledge-patch-nevaberry-plugins)
---
name: cassandra-knowledge-patch
description: Apache Cassandra
version: "5.0.8"
license: MIT
metadata:
author: Nevaberry
---
# Apache Cassandra
Load this skill when working on Cassandra commands, configuration, security,
queries, indexes, SSTables, topology, repairs, packages, or client tooling.
Use the topic references for detailed behavior, examples, and version attribution.
## Reference index
| Reference | Topics |
| --- | --- |
| [Operations, Topology, and Repair](references/operations-topology-and-repair.md) | Token metadata, bootstrap JMX, hints, batchlog, AutoRepair, Paxos, startup checks, streaming |
| [Protocols and Tooling](references/protocols-and-tooling.md) | Native protocol, command changes, runtime and builds, packages, downloads, maintenance windows, drivers, Sidecar, Analytics |
| [Queries, Schema, and Indexing](references/queries-schema-and-indexing.md) | Clustering types, schema descriptions, aggregates, filtering, SAI, index precedence, prepared statements |
| [Security and Configuration](references/security-and-configuration.md) | Authorization, passwords, audit and query logging, settings, extension validation, connection limits, guardrails |
| [Storage and Data Path](references/storage-and-data-path.md) | Mutations, TTLs, SSTable writing and reads, compaction, snapshots, cache invalidation, commit log replay, heap dumps |
## Command and compatibility changes
### Import copy flag
In 4.0.21, the short form of `--copy-data` changed from `-p` to `-cd`.
Update import commands that use the old short form.
```sh
nodetool import -cd mykeyspace mytable /path/to/sstables
```
### Tool environment loading
`nodetool` and other Cassandra tools source `cassandra-env.sh` only when needed.
Settings exported by that script apply to invocations that source it.
### Java driver dependency
The Java driver dependency moves from
`com.datastax.cassandra:cassandra-driver-core:3.11.5` to
`org.apache.cassandra:cassandra-driver-core:3.12.1`.
### Package repository addresses
Update existing APT entries to `https://debian.cassandra.apache.org`.
Update `/etc/yum.repos.d/cassandra.repo` to use
`https://redhat.cassandra.apache.org`.
For CentOS 7 and other systems with RPM earlier than 4.14, the Cassandra 5.0
base URL is `https://redhat.cassandra.apache.org/50x/noboolean/`.
The [tooling reference](references/protocols-and-tooling.md) contains the
signing-key commands, repository entries, and dependency attribution.
### Type and security constraints
`BytesType` (CQL `blob`) is considered compatible only with scalar types.
Regular users cannot bind an identity to a superuser role.
Cassandra rate-limits password changes; automated rotations that submit changes
in quick succession can hit the limit.
### Snapshot names
Cassandra validates snapshot names at creation, including tags supplied with
`nodetool snapshot -t`. An invalid tag causes snapshot creation to fail.
SSTable file path validation applies less restrictive checks to the snapshot
name in the path.
## Automated repair and topology
See [operations and repair](references/operations-topology-and-repair.md)
for the individual repair behaviors and their attribution.
- Built-in automated repair lets Cassandra schedule repairs itself.
- The AutoRepair scheduler stops when it detects two Cassandra major versions in the cluster.
- Full repairs scheduled by AutoRepair respect disk protection.
- The scheduler supports a configurable minimum repair task duration.
- The `preview_repaired` AutoRepair type checks repaired data for inconsistencies without repairing it.
- AutoRepair reports expected and actual repair bytes and keyspaces.
- AutoRepair can run with `parallel_repair_count` greater than `1` without triggering an assertion when checking whether a replica already has a repair in progress.
- Long-running repairs can continue past the point where earlier versions failed them automatically.
Run `nodetool checktokenmetadata` to check whether the node's token metadata
is in sync with its gossip endpoint state. The `StorageService` MBean is
available through JMX while a node is bootstrapping.
A hint's TTL starts when the original request begins; time spent waiting for
the request to time out counts toward that TTL. Cassandra can deliver hints
while the sender's and recipient's schemas differ.
Batchlog endpoint selection supports `random_remote`, `prefer_local`,
`dynamic_remote`, or `dynamic`.
## Queries, schema, and indexes
See [queries and indexing](references/queries-schema-and-indexing.md)
for the descending-key example and detailed query fixes.
- User-defined types and vectors can be clustering columns with `DESC` ordering.
- The `min` and `max` aggregates return the correct extrema for descending clustering columns.
- `DESCRIBE TABLE` includes definitions of materialized views based on the table.
- Cassandra rejects table names too long to fit in the corresponding filenames.
- When a column has both legacy 2i and SAI indexes, the legacy index takes priority.
- Indexing skips empty values for non-literal types and types that disallow empty values.
- Replica filtering protection can fetch beyond the query's row limit when resolving a static row.
- Already-built SAI indexes are queryable by the time a restarted node is marked `UP`.
- `nodetool tablestats` shows selected SAI state and query-performance metrics alongside table statistics.
- Cassandra can be configured to make `IndexStatusManager` always use the optimized index status format.
Invoke `dropPreparedStatements` on the `StorageService` MBean to invalidate
prepared statements on the node.
## Security, settings, and guardrails
See [security and configuration](references/security-and-configuration.md)
for grants, configuration validation, and logging behavior.
`CassandraCIDRAuthorizer` accepts parameters in its authorizer configuration.
Roles can receive grants on `system_views` and `system_virtual_schema`.
These statements give an existing `monitoring` role read access to both:
```sql
GRANT SELECT ON KEYSPACE system_views TO monitoring;
GRANT SELECT ON KEYSPACE system_virtual_schema TO monitoring;
```
In `system_views.settings`, complex settings serialize as JSON, security-sensitive
information is redacted, previously omitted configuration entries are included
for backward compatibility, and queries succeed for settings with non-string keys.
Use `nodetool getguardrailsconfig` to read the node's guardrail configuration
and `nodetool setguardrailsconfig` to update it. You can disable the disk usage
guardrail even after disk usage reaches its failure threshold.
A node can start for the first time with `data_disk_usage_max_disk_size` set
before its data directory has been created.
The `StorageProxyMBean` exposes `NativeTransportMaxConcurrentConnectionsPerIp`,
the node's native-protocol connection limit per client IP address.
## Storage, snapshots, and compaction
See [storage and the data path](references/storage-and-data-path.md)
for mutation, SSTable, compaction, snapshot, and recovery details.
- `CQLSSTableWriter` can notify its caller when it produces an SSTable.
- `CQLSSTableWriter` supports explicitly selecting BTI or Big as the output format.
- `CQLSSTableWriter` can write vectors of CQL `date` or `time` values.
- Cassandra can read memory-mapped trie indexes larger than 2 GiB.
- Range queries can read BTI SSTables opened before the writer finishes.
- Compaction marks an SSTable as suspect when it encounters a corrupt read from it.
- Cassandra automatically skips L0 sharding when an SAI vector index is present on the table.
- Compaction free-space checks use the estimated compressed table size.
- Updating a column with a different TTL that yields the same expiration time resolves deterministically, avoiding repair mismatches.
Snapshot schema CQL includes definitions of UDTs used as descending clustering
columns. `SnapshotLoader` can load schemas for tables created before Cassandra
2.1 whose snapshot directory paths omit the table ID.
When commit log replay skips a sync block because of a CRC error, it can
continue with the following blocks. Cassandra automatically falls back to
regular streaming for legacy SSTables that use the old Bloom filter format.
## Protocols, tools, and distributions
See [protocols and tooling](references/protocols-and-tooling.md) for all
protocol details, installation commands, artifact links, and maintenance windows.
The CQL message size limit applies to the complete message across multiple
frames. The native protocol decoder rejects a value whose declared length
exceeds the bytes available to read. On load shedding, the coordinator returns
`OverloadedException` with the original request's stream ID.
`cqlsh` can run with command history disabled and supports Python 3.12 or 3.13.
The direct-memory statistic in `nodetool gcstats` reports usage correctly.
For TLS connections, `cassandra-stress` negotiates the protocol version by
default and can use TLS 1.3 when the server supports it.
Cassandra 5.0.5 fully supports running on Java 17.
Run `ant artifacts` from the unpacked source distribution.
The `gen-doc` documentation generator uses Python; Go is no longer a build
dependency for documentation generation.
The Debian package normally starts Cassandra automatically on installation.
Start Cassandra manually after RPM installation with `sudo service cassandra start`.
The Java driver 4.19.3 is available as
`org.apache.cassandra:java-driver-core:4.19.3`.
Apache releases GoCQL 2.x from `apache/cassandra-gocql-driver` and publishes
a signed source tarball. Cassandra Sidecar 0.3.0 and Cassandra Analytics 0.3.0
each have release tarballs; their artifacts are available under
`org.apache.cassandra` on Maven Central.