-
Notifications
You must be signed in to change notification settings - Fork 49
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
ColumnFamilyStore: only quote table names if necessary #230
Conversation
In a recent patch, we added quoting of table names to ColumnFamilyStore, to solve a bug where the existance of a table with a colon in its name broke various JMX requests. I was under the impression that these quoted names were only used internally, for checking the validity of table names, and the code unquoted them when necessary. I thought based on my not-extensive-enough testing that nodetool now works correctly both when table names with colon names exist, and when they don't. Unfortunately, further runs of all nodetool dtests revealed that the quoting broke the "nodetool getsstables" command (and only it). For some reason I don't fully understand yet, this specific command ends up using ColumnFamilyStore and getting confused by the quoted table names. So in this patch, ColumnFamilyStore makes an effort to only quote a table name if it's necessary (i.e., contains a colon), and only unquote it when necessary. After this patch, the tests for "nodetool tablestats" and "nodetool info" with a colon in a table's name continue to pass (these are the cases solved by the previous patches, and this patch doesn't break them), and the "nodetool getsstables" test starts working again. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Hi @denesb, this is a followup to the fix in #227 (it's a followup, meaning I assume you didn't revert that older patch). I'm sorry about the mess. I confirmed that after this patch, the two dtests that failed the previous CI run now pass. I also confirmed that the two uncommitted dtests fixed by 227 didn't break by this patch. I didn't run all dtests again (life is too short), but I'm hopefull. |
Submodule update PR: scylladb/scylladb#16146. |
In a recent patch, we added quoting of table names to ColumnFamilyStore, to solve a bug where the existance of a table with a colon in its name broke various JMX requests. I was under the impression that these quoted names were only used internally, for checking the validity of table names, and the code unquoted them when necessary. I thought based on my not-extensive-enough testing that nodetool now works correctly both when table names with colon names exist, and when they don't. Unfortunately, further runs of all nodetool dtests revealed that the quoting broke the "nodetool getsstables" command (and only it). For some reason I don't fully understand yet, this specific command ends up using ColumnFamilyStore and getting confused by the quoted table names. So in this patch, ColumnFamilyStore makes an effort to only quote a table name if it's necessary (i.e., contains a colon), and only unquote it when necessary. After this patch, the tests for "nodetool tablestats" and "nodetool info" with a colon in a table's name continue to pass (these are the cases solved by the previous patches, and this patch doesn't break them), and the "nodetool getsstables" test starts working again. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes: #230 (cherry picked from commit e9b2644)
In a recent patch, we added quoting of table names to ColumnFamilyStore, to solve a bug where the existance of a table with a colon in its name broke various JMX requests. I was under the impression that these quoted names were only used internally, for checking the validity of table names, and the code unquoted them when necessary. I thought based on my not-extensive-enough testing that nodetool now works correctly both when table names with colon names exist, and when they don't. Unfortunately, further runs of all nodetool dtests revealed that the quoting broke the "nodetool getsstables" command (and only it). For some reason I don't fully understand yet, this specific command ends up using ColumnFamilyStore and getting confused by the quoted table names. So in this patch, ColumnFamilyStore makes an effort to only quote a table name if it's necessary (i.e., contains a colon), and only unquote it when necessary. After this patch, the tests for "nodetool tablestats" and "nodetool info" with a colon in a table's name continue to pass (these are the cases solved by the previous patches, and this patch doesn't break them), and the "nodetool getsstables" test starts working again. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes: #230 (cherry picked from commit e9b2644) (cherry picked from commit f45067f)
In a recent patch, we added quoting of table names to ColumnFamilyStore, to solve a bug where the existance of a table with a colon in its name broke various JMX requests.
I was under the impression that these quoted names were only used internally, for checking the validity of table names, and the code unquoted them when necessary. I thought based on my not-extensive-enough testing that nodetool now works correctly both when table names with colon names exist, and when they don't.
Unfortunately, further runs of all nodetool dtests revealed that the quoting broke the "nodetool getsstables" command (and only it). For some reason I don't fully understand yet, this specific command ends up using ColumnFamilyStore and getting confused by the quoted table names.
So in this patch, ColumnFamilyStore makes an effort to only quote a table name if it's necessary (i.e., contains a colon), and only unquote it when necessary.
After this patch, the tests for "nodetool tablestats" and "nodetool info" with a colon in a table's name continue to pass (these are the cases solved by the previous patches, and this patch doesn't break them), and the "nodetool getsstables" test starts working again.