-
Notifications
You must be signed in to change notification settings - Fork 21
CNDB-13299 prevent too long index names #1633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Checklist before you submit for review
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC the file names are the result of the concatenation of the keyspace and tablename and the indexname, why don't we consider tableName.length() + keyspaceName.length() here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, file names for indexes do not use keyspace and table names when an index name is explicitly given. See the discussion in the issue.
src/java/org/apache/cassandra/cql3/statements/schema/CreateIndexStatement.java
Outdated
Show resolved
Hide resolved
09d48cd to
136c691
Compare
|
❌ Build ds-cassandra-pr-gate/PR-1633 rejected by Butler1 new test failure(s) in 4 builds Found 1 new test failures
Found 32 known test failures |
Creating an index with too long index names leads to file errors or incorrect results. This PR prevents creating new indexes, i.e., not internal, with provided index names longer than 182 characters. This constant is based on the most restrictive requirement from different index types. It comes from SAI by subtracting the longest file name addition from the file name limit of 255 characters.
Creating an index with too long index names leads to file errors or incorrect results. This PR prevents creating new indexes, i.e., not internal, with provided index names longer than 182 characters. This constant is based on the most restrictive requirement from different index types. It comes from SAI by subtracting the longest file name addition from the file name limit of 255 characters.



What is the issue
Fixes https://github.com/riptano/cndb/issues/13299
Creating an index with too long index names leads to file errors or incorrect results.
What does this PR fix and why was it fixed
This PR prevents creating new indexes, i.e., not internal, with provided index names longer than 182 characters. This constant is based on the most restrictive requirement from different index types. It comes from SAI by subtracting the longest file name addition from the file name limit of 255 characters.