rtib commented on code in PR #3905:
URL: https://github.com/apache/cassandra/pull/3905#discussion_r1960283622
##########
src/java/org/apache/cassandra/auth/DataResource.java:
##########
@@ -249,7 +250,8 @@ public boolean exists()
return true;
case KEYSPACE:
case ALL_TABLES:
- return Schema.instance.getKeyspaces().contains(keyspace);
+ return Schema.instance.getKeyspaces().contains(keyspace) ||
+
VirtualKeyspaceRegistry.instance.getKeyspaces().contains(keyspace);
Review Comment:
You are right. A mismatch would be considered a bug. As long as it is not
possible to create virtual keyspaces dynamically, the two sources are
equivalent. (a "user defined virtual keyspace" feature ... could be a thing 🤔)
Copying the entire set of names could have a performance impact. However,
since this method is only used within the authorizer, its impact might be
negligible.
Using `SchemaConstants.isVirtualSystemKeyspace` makes the change to
`VirtualKeyspaceRegistry` unnecessary and thus the patch becomes smaller. I'll
give it a try.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]