This commit increases the maximum length of names for keyspaces, tables, materialized views, and indexes from 48 to 192 bytes. The previous 48-bytes limit was inherited from Cassandra 3 for compatibility. However, this validation was removed in Cassandra 4 and 5 (see CASSANDRA-20389) and some usage scenarios (such as some feature store workflows generating long table names) now depend on this relaxed constraint. This change brings ScyllaDB's behavior in line with modern Cassandra versions and better supports these use cases. The new limit of 192 bytes is derived from underlying filesystem limitations to prevent runtime errors when creating directories for table data. When a new table is created, ScyllaDB generates a directory for its SSTables. The directory name is constructed from the table name, a dash, and a 32-character UUID. For a CDC-enabled table, an associated log table is also created, which has the suffix `_scylla_cdc_log` appended to its name. The directory name for this log table becomes the longest possible representation. Additionally we reserve 15 bytes for future use, allowing for potential future extensions without breaking existing schemas. To guarantee that directory creation never fails due to exceeding filesystem name limits, the maximum name length is calculated as follows: 255 bytes (common filesystem limit for a path component) - 32 bytes (for the 32-character UUID string) - 1 byte (for the '-' separator) - 15 bytes (for the '_scylla_cdc_log' suffix) - 15 bytes (reserved for future use) ---------- = 192 bytes (Maximum allowed name length) This calculation is similar in principle to the one proposed for Cassandra to fix related directory creation failures (see apache/cassandra/pull/4038). This patch also updates/adds all associated tests to validate the new 192-byte limit. The documentation has been updated accordingly.
75 lines
1.8 KiB
ReStructuredText
75 lines
1.8 KiB
ReStructuredText
==============
|
|
Limits
|
|
==============
|
|
|
|
This document provides hard and soft limits in ScyllaDB.
|
|
|
|
Cluster and Node Limits
|
|
-----------------------------
|
|
|
|
.. list-table::
|
|
:widths: 50 50
|
|
:header-rows: 1
|
|
|
|
* - Component
|
|
- Limit
|
|
* - Nodes per cluster
|
|
- Low hundreds
|
|
* - Node size
|
|
- 256 vcpu
|
|
|
|
See :ref:`Hardware Requirements <system-requirements-hardware>` for storage
|
|
and memory requirements and limits.
|
|
|
|
CQL Limits
|
|
--------------
|
|
|
|
.. list-table::
|
|
:widths: 50 50
|
|
:header-rows: 1
|
|
|
|
* - Component
|
|
- Limit
|
|
* - Keyspaces per cluster
|
|
- Thousands (tested with 1000)
|
|
* - Tables per keyspace
|
|
- Low thousands (tested with 5000)
|
|
* - Tables per cluster (including indexes)
|
|
- Thousands
|
|
* - Tables with CDC enabled
|
|
- No limit. CDC can be enabled for all tables in a cluster.
|
|
* - Materialized views and secondary indexes per table
|
|
- Low tens
|
|
* - Columns per table
|
|
- Hundreds
|
|
* - Columns per cluster
|
|
- Tens of thousands
|
|
* - Partition size
|
|
- Gigabytes
|
|
* - Rows per partition
|
|
- No limit
|
|
* - Row size
|
|
- Latency-related soft limit:
|
|
|
|
Hundreds of kilobytes (good latency) or megabytes (mediocre latency)
|
|
* - Key length
|
|
- 65533
|
|
* - Keyspace / Table / View / Index name length
|
|
- 192 characters
|
|
* - Query parameters in a query
|
|
- 65535 (2^16-1)
|
|
* - Statements in a batch
|
|
- 65535 (2^16-1)
|
|
* - Fields in a tuple
|
|
- 32768 (2^15) (just a few fields, such as 2-10, are recommended)
|
|
* - Collection (List)
|
|
- ~2 billion (2^31)
|
|
* - Collection (Set)
|
|
- ~2 billion (2^31)
|
|
* - Collection (Map)
|
|
- Number of keys: 65535 (2^16-1)
|
|
* - Blob size
|
|
- 2 GB ( less than 1 MB is recommended)
|
|
* - Dimension of a vector
|
|
- 16000 (according to OpenSearch limitations)
|
|
|