[
https://issues.apache.org/jira/browse/OAK-3476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14948122#comment-14948122
]
Chetan Mehrotra commented on OAK-3476:
--------------------------------------
Most likely debug level for audit logger is enabled. Anyway use of Marker is
not appropriate here. Session Id if to be used should be done more with MDC.
Marker are meant to be used with few known names and not with dynamic names
[1]. So what I have done here is "misuse" of the feature. Thinking again we do
not require marker based logging here
[1]
http://stackoverflow.com/questions/4165558/best-practices-for-using-markers-in-slf4j-logback/10231016
> Memory leak caused by using marker names based on non static session id
> -----------------------------------------------------------------------
>
> Key: OAK-3476
> URL: https://issues.apache.org/jira/browse/OAK-3476
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Fix For: 1.3.8, 1.0.23, 1.2.8
>
>
> {{SessionDelegate}} creates marker based on session id. As session id is
> variable such markers can get accumulated over time resulting in memory leak
> [1]
> {code}
> private static <T> void logOperationDetails(ContentSession session,
> SessionOperation<T> ops) {
> if (readOperationLogger.isTraceEnabled()
> || writeOperationLogger.isTraceEnabled()
> || auditLogger.isDebugEnabled()) {
> Marker sessionMarker =
> MarkerFactory.getMarker(session.toString());
> Logger log = ops.isUpdate() ? writeOperationLogger :
> readOperationLogger;
> log.trace(sessionMarker, "[{}] {}", session, ops);
> {code}
> *Workaround*
> Untill we fix it in code user should just set log level to info for following
> loggers
> * org.apache.jackrabbit.oak.audit
> * org.apache.jackrabbit.oak.jcr.operations.reads
> [1] http://stackoverflow.com/q/31524084/1035417
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)