patrickclee0207 commented on a change in pull request #1369:
URL: https://github.com/apache/cassandra/pull/1369#discussion_r774094470
##########
File path: src/java/org/apache/cassandra/transport/messages/QueryMessage.java
##########
@@ -113,6 +114,13 @@ protected boolean isTrackable()
QueryHandler queryHandler = ClientState.getCQLQueryHandler();
statement = queryHandler.parse(query, state, options);
+ if (statement instanceof AlterSchemaStatement){
+ logger.info(String.format("DDL Query: %s, Keyspace: %s, by
User: %s, From: %s",
+ query,
+ ((AlterSchemaStatement)
statement).keyspace(),
+
state.getClientState().getUser().getName(),
+ state.getClientAddress()));
Review comment:
now using the QueryState getClientAddress which if it's an internal
query it would return null else the client address. this looks to be better
here than before directly with ClientState
--
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]