Skip to content

CASSANDRA-17416: Test Failure: org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest.testCDCIndexFileWriteOnSync#1605

Closed
yifan-c wants to merge 3 commits into
apache:trunkfrom
yifan-c:CASSANDRA-17416/trunk
Closed

CASSANDRA-17416: Test Failure: org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDCTest.testCDCIndexFileWriteOnSync#1605
yifan-c wants to merge 3 commits into
apache:trunkfrom
yifan-c:CASSANDRA-17416/trunk

Conversation

@yifan-c
Copy link
Copy Markdown
Contributor

@yifan-c yifan-c commented May 5, 2022

No description provided.

// It is possible to read an empty line. In this case, re-try at most 5 times.
for (int i = 0; input == null && i < 5; i++)
{
try (BufferedReader in = new BufferedReader(new FileReader(cdcIndexFile)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth putting a small sleep in here to give the system the wiggle room to allow the scheduler to put the index file writing thread back on the stack and write the file out instead of just spinning on it 5 times?

@yifan-c yifan-c closed this May 6, 2022
pcmanus pushed a commit to pcmanus/cassandra that referenced this pull request Mar 5, 2025
…che#1605)

### What is the issue

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.

### What does this PR fix and why was it fixed

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.
michaelsembwever pushed a commit to thelastpickle/cassandra that referenced this pull request Jan 7, 2026
…che#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.
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.

2 participants