smiklosovic commented on a change in pull request #1051:
URL: https://github.com/apache/cassandra/pull/1051#discussion_r686565547
##########
File path: src/java/org/apache/cassandra/audit/AuditLogManager.java
##########
@@ -148,6 +167,8 @@ public synchronized void disableAuditLog()
unregisterAsListener();
IAuditLogger oldLogger = auditLogger;
auditLogger = new NoOpAuditLogger(Collections.emptyMap());
+ // when we disable audit logging, we should also reset options so we
return default ones (from cassandra.yml)
+ auditLogOptions = DatabaseDescriptor.getAuditLoggingOptions();
Review comment:
One more thing related to this change, it is harder to explain here, you
would need to see the code so take a deeper look please, but conceptually, I
might just set "options.enabled = false" upon disabling so all other options
would stay there and if you enable again, we would just take these options and
I would set "options.enabled = true" etc ...
but you might (re)enable your audit logger differently next time, if you
enable and disable it, if you want to enable it again, it does not necessarilly
mean that all your options from the last enablement time are OK for you this
time, you might change them.
So we would have to "merge" the old options with the new options in order to
rewrite these which changed, but keep these which are same.
I think this just adds additional complexity and it is quite confusing for
users. I prefer to "enable" and "disable" and _that's that_. I do not want to
keep any "previous cached options". I just want to start with clean table next
time I enable.
FQL behaves differently on the code level but in practice it behaves same.
--
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]