[
https://issues.apache.org/jira/browse/SOLR-11901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erick Erickson reassigned SOLR-11901:
-------------------------------------
Assignee: Erick Erickson
> Improve how logging collects class name information
> ---------------------------------------------------
>
> Key: SOLR-11901
> URL: https://issues.apache.org/jira/browse/SOLR-11901
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Varun Thacker
> Assignee: Erick Erickson
> Priority: Minor
>
> The log4j.properties that we ship with Solr has this Pattern
> {code}
> %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica}
> %X{core}] %c{1.} %m%n
> {code}
> The {{%c}} collects class name information ( more on this
> http://logging.apache.org/log4j/2.x/manual/async.html#Location ) which
> creates a throwable (
> https://github.com/apache/log4j/blob/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java#L253
> ) and it can be expensive
> Here is the stack trace excerpt from the JFR capture which lead to this issue
> {code}
> org.apache.log4j.spi.LoggingEvent.getLocationInformation()
> org.apache.log4j.helpers.PatternParser$ClassNamePatternConverter.getFullyQualifiedName(LoggingEvent)
> org.apache.log4j.helpers.PatternParser$NamedPatternConverter.convert(LoggingEvent)
> org.apache.log4j.helpers.PatternConverter.format(StringBuffer, LoggingEvent)
> org.apache.log4j.PatternLayout.format(LoggingEvent)
> org.apache.log4j.WriterAppender.subAppend(LoggingEvent)
> org.apache.log4j.RollingFileAppender.subAppend(LoggingEvent)
> ...
> org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.finish()
> 214,658 32.42 0
> {code}
> We could remove capturing the class name information from the default config
> but ideally capturing the classname is useful. So if we can find a way that
> doesn't need to create a throwable then it's ideal.
> Here is an interesting read :
> https://shipilev.net/blog/2014/exceptional-performance/
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]