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
[WFCORE-839] : Don't store state in InMemoryAuditLogHandlerResourceDefinition. #924
Conversation
Core - Full Integration Build 1418 is now running using a merge of cf6913c |
Windows Build 1801 is now running using a merge of cf6913c |
Linux Build 2281 is now running using a merge of cf6913c |
Windows Build 1801 outcome was SUCCESS using a merge of cf6913c |
Linux Build 2281 outcome was SUCCESS using a merge of cf6913c |
Core - Full Integration Build 1418 outcome was SUCCESS using a merge of cf6913c |
@@ -58,36 +58,34 @@ | |||
} | |||
private static final String IN_MEMORY_FORMATTER_NAME = "in-memory-formatter"; | |||
private final List<ModelNode> items; | |||
private int maxHistory; | |||
private volatile int maxHistory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of this class isn't thread safe. I don't think volatile
is needed here.
Core - Full Integration Build 1450 is now running using a merge of a892dd1 |
Windows Build 1831 is now running using a merge of a892dd1 |
Linux Build 2314 is now running using a merge of a892dd1 |
Windows Build 1831 outcome was SUCCESS using a merge of a892dd1 |
Linux Build 2314 outcome was SUCCESS using a merge of a892dd1 |
Core - Full Integration Build 1450 outcome was SUCCESS using a merge of a892dd1 |
We're all these changes necessary for WFCORE-839, or was there some other problem that had to be fixed? This is a lot bigger than I expected; I thought it would be trivial. The handler doesn't seem thread safe now. |
The handler isn't thread safe as all handlers. Thread safety is managed by ManagedAuditLoggerImpl. Since the map was already existing i switched back to using ManagedAuditLogger for all operations on the InMemoryHandler as was 'proper'. |
Thanks; I'll have another look now that I get the idea. :) |
super.setMaxFailureCount(maxHistory); | ||
this.maxHistory = maxHistory; | ||
while (maxHistory < items.size()) { | ||
items.remove(0); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at ManagedAuditLogger, it already has handler-specific modification methods, e.g. updateSyslogHandlerAppName, updateSyslogHandlerFacility, updateSyslogHandlerReconnectTimeout. That's a bit yuck, but since they are already there I don't see why another one can't be added for setting the max history.
ManagedAuditLogger isn't usable outside the kernel so we can be a bit casual about its API.
Linux Build 2398 is now running using a merge of e730e78 |
Linux Build 2398 outcome was FAILURE using a merge of e730e78 Failed tests
|
WildFly pull requests Build 1827 outcome was FAILURE using a merge of e730e78 |
…finition. Updating ManagedAuditLogger to be able to access the last log entries with only a real implemntation in the InMemoryAuditLogHander.
Linux Build 2399 is now running using a merge of fec40cb |
Linux Build 2399 outcome was SUCCESS using a merge of fec40cb |
WildFly pull requests Build 1828 outcome was FAILURE using a merge of fec40cb |
[WFCORE-839] : Don't store state in InMemoryAuditLogHandlerResourceDefinition.
[JBEAP-20004] DeploymentUnitProcessor refactoring to allow sharing of ServiceName for SecurityDomain.
Updating ManagedAuditLogger to be able to access the last log entries with only a real implemntation in the InMemoryAuditLogHander.
Jira: https://issues.jboss.org/browse/WFCORE-839