Skip to content

Cassandra 17455 4.1#1623

Closed
bereng wants to merge 2 commits into
apache:cassandra-4.1from
bereng:CASSANDRA-17455-4.1
Closed

Cassandra 17455 4.1#1623
bereng wants to merge 2 commits into
apache:cassandra-4.1from
bereng:CASSANDRA-17455-4.1

Conversation

@bereng
Copy link
Copy Markdown
Contributor

@bereng bereng commented May 13, 2022

No description provided.

@bereng
Copy link
Copy Markdown
Contributor Author

bereng commented May 13, 2022

CI here

@bereng bereng closed this May 19, 2022
@bereng bereng deleted the CASSANDRA-17455-4.1 branch May 19, 2022 09:29
blambov pushed a commit to blambov/cassandra that referenced this pull request Mar 24, 2025
Fixes riptano/cndb#12683

Table names are used in file names. Since the table names were not
validated on its length, creating or flushing a table with too long name
fails on too long file name.
There are two cases with using table names in file names:
- keyspace_name .table_name-controller-config.JSON
- table_name-32chars_table_id 

The maximum allowed file name size is 255 chars. Thus, 
- keyspace and table names, which are together longer than 231 chars,
will fail.
- a table name, which is longer than 222 chars, will fail.

This PR checks that creating new table name should not have too long
table name.
New tables are identified through the query's client state, which should
not be internal.
The limit is 222 chars for combined keyspace and table names. This is
more restrictive than necessary, but is easier to explain in the
documentation.

The change is tested in CNDB that creating new tables with long names
are prevented, but existing tables still work.
blambov pushed a commit to blambov/cassandra that referenced this pull request Mar 27, 2025
…pache#1629)

Fixes riptano/cndb#12683

Table names are used in file names. Since the table names were not
validated on its length, creating or flushing a table with too long name
fails on too long file name.
There are two cases with using table names in file names:
- keyspace_name .table_name-controller-config.JSON
- table_name-32chars_table_id 

The maximum allowed file name size is 255 chars. Thus, 
- keyspace and table names, which are together longer than 231 chars,
will fail.
- a table name, which is longer than 222 chars, will fail.

This PR checks that creating new table name should not have too long
table name.
New tables are identified through the query's client state, which should
not be internal.
The limit is 222 chars for combined keyspace and table names. This is
more restrictive than necessary, but is easier to explain in the
documentation.

The change is tested in CNDB that creating new tables with long names
are prevented, but existing tables still work.
michaelsembwever pushed a commit to thelastpickle/cassandra that referenced this pull request Jan 7, 2026
Fixes riptano/cndb#12683

Table names are used in file names. Since the table names were not
validated on its length, creating or flushing a table with too long name
fails on too long file name.
There are two cases with using table names in file names:
- keyspace_name .table_name-controller-config.JSON
- table_name-32chars_table_id

The maximum allowed file name size is 255 chars. Thus,
- keyspace and table names, which are together longer than 231 chars,
will fail.
- a table name, which is longer than 222 chars, will fail.

This PR checks that creating new table name should not have too long
table name.
New tables are identified through the query's client state, which should
not be internal.
The limit is 222 chars for combined keyspace and table names. This is
more restrictive than necessary, but is easier to explain in the
documentation.

The change is tested in CNDB that creating new tables with long names
are prevented, but existing tables still work.
lesnik2u pushed a commit to lesnik2u/cassandra that referenced this pull request May 26, 2026
…apache#1572)

Handle FSError thrown when the controller config file name is too long.
Otherwise, the exception causes failures to create CFS instance.

 (Rebase of commit aede4c5)

CNDB-12683 improve name validation functions and test long names (apache#1605)

The functions validating schema object names are misleading and placed
in different files. This led to incorrect use of them and failures on creating
tables with long names.

This PR reorganizes the name validation functions, so they are not
confused and misused. The error messages are fixed accordantly.

This PR also makes minor change to a long table name test to use the
keyspace name reported in an incident. New test is added on
non-alpha-numeric table name to improve the test coverage.

 (Rebase of commit aa0b2e7)

CNDB-12683 validate table name length for not-internal (apache#1623)

Fixes riptano/cndb#12683

Table names are used in file names. Since the table names were not
validated on its length, creating or flushing a table with too long name
fails on too long file name.
There are two cases with using table names in file names:
- keyspace_name .table_name-controller-config.JSON
- table_name-32chars_table_id

The maximum allowed file name size is 255 chars. Thus,
- keyspace and table names, which are together longer than 231 chars,
will fail.
- a table name, which is longer than 222 chars, will fail.

This PR checks that creating new table name should not have too long
table name.
New tables are identified through the query's client state, which should
not be internal.
The limit is 222 chars for combined keyspace and table names. This is
more restrictive than necessary, but is easier to explain in the
documentation.

The change is tested in CNDB that creating new tables with long names
are prevented, but existing tables still work.

 (Rebase of commit 8cc6812)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant