-
Notifications
You must be signed in to change notification settings - Fork 21
CNDB-12683 validate table name length for not-internal #1623
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
|
405fd0f to
84118a9
Compare
320fa14 to
d8b10aa
Compare
eolivelli
left a comment
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.
+1
|
|
2db7861 to
0d71dde
Compare
I dropped this change from this PR and will do it after the release. |
|
❌ Build ds-cassandra-pr-gate/PR-1623 rejected by Butler1 new test failure(s) in 8 builds Found 1 new test failures
Found 217 known test failures |
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.
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.
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.
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.



What is the issue
Fixes https://github.com/riptano/cndb/issues/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:
.table name-controller-config.JSON-32 chars table idThe maximum allowed file name size is 255 chars. Thus,
What does this PR fix and why was it fixed
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.