-
Notifications
You must be signed in to change notification settings - Fork 79
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
NodeProbe: allow addressing table name with colon in it #355
Conversation
As the ObjectName documentation explains, when an addressing an MBean in JMX, when a value contains a comma, equals, colon or quote - it must be quoted, otherwise the ObjectName cannot be constructed. CQL or Alternator table names cannot contain any of these characters, but in Alternator the names of secondary indexes *do* contain a colon, so before this patch nodetool cannot address them - it tries to construct an ObjectName with that name, and fails. Note that "nodetool tablestats" is also broken by this bug, because even if the user doesn't try to specify one specific table, nodetool iterates on all tables and fails when it reaches the view with the colon in its name. So this patch adds the missing quoting if the table name contains a colon. We don't quote table names that don't have a colon to preserve backward compatibility with old implmentation of JMX that don't know how to unquote these names. A separate patch to scylla-jmx added support for unquoting - see scylladb/scylla-jmx#227. After this patch "nodetool tablestats" can work even if there is an Alternator GSI or LSI. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
See also pull requests in other repositories:
|
@nyh should I wait for scylladb/scylla-jmx#227 to promote in scylla.git, or can I merge right away? |
It's merged, I think we can merge this one as well. |
It is only queued, and it will probably need dequeuing because it is apparently causing problems. |
Submodule update PR: scylladb/scylladb#16146 |
As the ObjectName documentation explains, when an addressing an MBean in JMX, when a value contains a comma, equals, colon or quote - it must be quoted, otherwise the ObjectName cannot be constructed. CQL or Alternator table names cannot contain any of these characters, but in Alternator the names of secondary indexes *do* contain a colon, so before this patch nodetool cannot address them - it tries to construct an ObjectName with that name, and fails. Note that "nodetool tablestats" is also broken by this bug, because even if the user doesn't try to specify one specific table, nodetool iterates on all tables and fails when it reaches the view with the colon in its name. So this patch adds the missing quoting if the table name contains a colon. We don't quote table names that don't have a colon to preserve backward compatibility with old implmentation of JMX that don't know how to unquote these names. A separate patch to scylla-jmx added support for unquoting - see scylladb/scylla-jmx#227. After this patch "nodetool tablestats" can work even if there is an Alternator GSI or LSI. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes: #355 (cherry picked from commit 26f5f71)
As the ObjectName documentation explains, when an addressing an MBean in JMX, when a value contains a comma, equals, colon or quote - it must be quoted, otherwise the ObjectName cannot be constructed. CQL or Alternator table names cannot contain any of these characters, but in Alternator the names of secondary indexes *do* contain a colon, so before this patch nodetool cannot address them - it tries to construct an ObjectName with that name, and fails. Note that "nodetool tablestats" is also broken by this bug, because even if the user doesn't try to specify one specific table, nodetool iterates on all tables and fails when it reaches the view with the colon in its name. So this patch adds the missing quoting if the table name contains a colon. We don't quote table names that don't have a colon to preserve backward compatibility with old implmentation of JMX that don't know how to unquote these names. A separate patch to scylla-jmx added support for unquoting - see scylladb/scylla-jmx#227. After this patch "nodetool tablestats" can work even if there is an Alternator GSI or LSI. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes: #355 (cherry picked from commit 26f5f71) (cherry picked from commit 3764ae9)
As the ObjectName documentation explains, when an addressing an MBean in JMX, when a value contains a comma, equals, colon or quote - it must be quoted, otherwise the ObjectName cannot be constructed.
CQL or Alternator table names cannot contain any of these characters, but in Alternator the names of secondary indexes do contain a colon, so before this patch nodetool cannot address them - it tries to construct an ObjectName with that name, and fails.
Note that "nodetool tablestats" is also broken by this bug, because even if the user doesn't try to specify one specific table, nodetool iterates on all tables and fails when it reaches the view with the colon in its name.
So this patch adds the missing quoting if the table name contains a colon. We don't quote table names that don't have a colon to preserve backward compatibility with old implmentation of JMX that don't know how to unquote these names. A separate patch to scylla-jmx added support for unquoting - see scylladb/scylla-jmx#227.
After this patch "nodetool tablestats" can work even if there is an Alternator GSI or LSI.