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
Some nodetool commands break when there is an Alternator GSI in the database #16153
Comments
@scylladb/scylla-maint can someone handle the backport? |
The author is a maintainer himself, so he is the best candidate to do the backport. |
Backporting with all these submodules is no fun, but I accept the challenge. I think because of all these submodules I can't really run CI before merging the various backport, so I hope I don't mess this up. |
If you are not sure, you can create a PR in scylla.git for the submodule update, and merge it yourself after CI passes. |
@denesb you're right, but it still requires that I merge everything into the submodules first, without a PR. I'll think what is the least ugly and/or risky way to do this. |
Isn't the core issue that submodules do not have a meaningful CI? |
Yes, you have to cherry-pick the fixes onto the branch-X of the submodule, then push it to origin, and only after that create the PR in sscylla.git. You are right that if CI fails, you already pushed the branches in the submodule. Note that since the submodules are updated with explicit commits, we have a bit more freedom with force-pushes and we can even waive the bisectability requirement for submodule branches. If you find something went wrong, you can backport additional commits, or edit and force-push the existing commit. |
Yes, that is one of the issues. We merge/backport directly to master/branch-X not to next[-X]. |
Fixes scylladb#16153 * jmx 166599f...f45067f (3): > ColumnFamilyStore: only quote table names if necessary > APIBuilder: allow quoted scope names > ColumnFamilyStore: don't fail if there is a table with ":" in its name * java dfbf3726ee...3764ae94db (1): > NodeProbe: allow addressing table name with colon in it Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Fixes scylladb#16153 * jmx 166599f...f45067f (3): > ColumnFamilyStore: only quote table names if necessary > APIBuilder: allow quoted scope names > ColumnFamilyStore: don't fail if there is a table with ":" in its name * java dfbf3726ee...3764ae94db (1): > NodeProbe: allow addressing table name with colon in it Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Fixes scylladb#16153 * java e716e1bd1d...80701efa8d (1): > NodeProbe: allow addressing table name with colon in it /home/nyh/scylla/tools$ git submodule summary jmx | cat * jmx bc4f8ea...f21550e (3): > ColumnFamilyStore: only quote table names if necessary > APIBuilder: allow quoted scope names > ColumnFamilyStore: don't fail if there is a table with ":" in its name Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Right, I know all this, but it's still extremely ugly and error-prone. Even if an error doesn't mean absolute disaster, it's still annoying, and is especially problematic if multiple people are trying to backport in parallel, which I admit isn't common. Anyway, I'll manage :-) |
Fixes #16153 * jmx 166599f...f45067f (3): > ColumnFamilyStore: only quote table names if necessary > APIBuilder: allow quoted scope names > ColumnFamilyStore: don't fail if there is a table with ":" in its name * java dfbf3726ee...3764ae94db (1): > NodeProbe: allow addressing table name with colon in it Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #16294
Fixes #16153 * java e716e1bd1d...80701efa8d (1): > NodeProbe: allow addressing table name with colon in it /home/nyh/scylla/tools$ git submodule summary jmx | cat * jmx bc4f8ea...f21550e (3): > ColumnFamilyStore: only quote table names if necessary > APIBuilder: allow quoted scope names > ColumnFamilyStore: don't fail if there is a table with ":" in its name Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #16296
The two CI runs passed, and I now merged the tools/java and tools/jmx changes into the scylladb.git next-5.2 and next-5.4 branches. They should hopefully be promoted to branch-5.2 and branch-5.4 soon (which should be successful because the CI already tested that I didn't goof up the backport). Please note that I did NOT backport the dtest commit (see https://github.com/scylladb/scylla-dtest/pull/3738) that verifies that these patches actually fixes the original bug. |
@kostja what is the meaning of assigning this closed issue to me? As I noted above, I already backported it to 5.2 and 5.4. |
You worked on this issue, so I assigned it to you. It's good for the stats, and for getting notifications (sometimes there are notifications on closed issues). |
Oh :-) |
We already have an issue about this in a different repository, scylladb/scylla-jmx#226 because the fix is in scylla-jmx and scylla-tools-java, not scylladb core. But I'm nevertheless opening an issue also here because we will need to update the scylla-jmx and scylla-tools-java submodules - and this update will "Fixes" this issue. This will allow us to also track the backporting of this update.
Normally, CQL table names may only have alphanumeric characters or underscores. The DynamoDB API also adds dash and dot as allowed characters. But when Alternator creates a GSI or LSI, the materialized view name will also contain a ":" or "!" characters, respectively.
It turns out that JMX, used by nodetool, saves the Java Bean "address" of table names as Java ObjectName, which is constructed with a string like
org.apache.cassandra.db:type=tname,keyspace=ksname,columnfamily=cfname
. But when the cfname string contains a colon, it must be quoted. As the ObjectName documentation explains:Of these characters (comma, equals, colon or quote), only the colon is actually possible in table names.
If we don't quote these names, two kinds of bugs can happen:
There are three PRs that fix the known bugs:
And also a dtest PR that reproduce the bug - and verify the fix - specifically in "nodetool info" and "nodetool tablestates". We may need to write additional tests later (and it's possible we didn't fix all the nodetool bugs in this area...).
The text was updated successfully, but these errors were encountered: