You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Konstantin Hollerith (JIRA)" <ji...@apache.org> on 2016/01/12 10:15:39 UTC
[jira] [Updated] (SOLR-8536) MDC handling in
MDCAwareThreadPoolExecutor uses even non-solr MDC parameters
[ https://issues.apache.org/jira/browse/SOLR-8536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Hollerith updated SOLR-8536:
---------------------------------------
Description:
I'm using SLF4J MDC to log additional Information in my WebApp. Some of my
MDC-Parameters even include Line-Breaks.
It seems, that Solr takes _all_ MDC parameters and puts them into the
Thread-Name, see
org.apache.solr.common.util.ExecutorUtil.MDCAwareThreadPoolExecutor.execute(Runnable).
When there is some logging of Solr, the log gets cluttered:
{noformat}
[11.01.16 09:14:19:170 CET] 000002a3 SystemOut O 09:14:19,169
[zkCallback-14-thread-1-processing-My
Custom
MDC
Parameter ROraqiFWaoXqP21gu4uLpMh SANDHO] WARN
common.cloud.ConnectionManager [session=ROraqiFWaoXqP21gu4uLpMh]
[user=SANDHO]: zkClient received AuthFailed
{noformat}
(some of my MDC-Parameters are only active in Email-Logs and are not
included in the file-log)
Solr should only put its own MDC-Parameter into the
Thread-Name.
Possible Solution: Since all (as far as i can check) invocations in Solr of
MDC.put uses a Prefix like "ConcurrentUpdateSolrClient" or
"CloudSolrClient" etc., it would be possible to put a check into
MDCAwareThreadPoolExecutor.execute(Runnable) that process only those
Prefixes.
See also discussion on mailing list:
Topic:Possible Bug - MDC handling in org.apache.solr.common.util.ExecutorUtil.MDCAwareThreadPoolExecutor.execute(Runnable)
Date: Mon, 11 Jan 2016 09:00:43 GMT
was:
I'm using SLF4J MDC to log additional Information in my WebApp. Some of my
MDC-Parameters even include Line-Breaks.
It seems, that Solr takes _all_ MDC parameters and puts them into the
Thread-Name, see
org.apache.solr.common.util.ExecutorUtil.MDCAwareThreadPoolExecutor.execute(Runnable).
When there is some logging of Solr, the log gets cluttered:
{noformat}
[11.01.16 09:14:19:170 CET] 000002a3 SystemOut O 09:14:19,169
[zkCallback-14-thread-1-processing-My
Custom
MDC
Parameter ROraqiFWaoXqP21gu4uLpMh SANDHO] WARN
common.cloud.ConnectionManager [session=ROraqiFWaoXqP21gu4uLpMh]
[user=SANDHO]: zkClient received AuthFailed
{noformat}
(some of my MDC-Parameters are only active in Email-Logs and are not
included in the file-log)
Solr should only put its own MDC-Parameter into the
Thread-Name.
Possible Solution: Since all (as far as i can check) invocations in Solr of
MDC.put uses a Prefix like "ConcurrentUpdateSolrClient" or
"CloudSolrClient" etc., it would be possible to put a check into
MDCAwareThreadPoolExecutor.execute(Runnable) that process only those
Prefixes.
Link to discussion on mailing list:
https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201601.mbox/browser
> MDC handling in MDCAwareThreadPoolExecutor uses even non-solr MDC parameters
> ----------------------------------------------------------------------------
>
> Key: SOLR-8536
> URL: https://issues.apache.org/jira/browse/SOLR-8536
> Project: Solr
> Issue Type: Bug
> Components: SolrJ
> Affects Versions: 5.4
> Environment: JSF-Based App with WebSphrere 8.5, Solr 5.3.0, slf4j-1.7.12,
> all jars are in WEB-INF/lib.
> Reporter: Konstantin Hollerith
>
> I'm using SLF4J MDC to log additional Information in my WebApp. Some of my
> MDC-Parameters even include Line-Breaks.
> It seems, that Solr takes _all_ MDC parameters and puts them into the
> Thread-Name, see
> org.apache.solr.common.util.ExecutorUtil.MDCAwareThreadPoolExecutor.execute(Runnable).
> When there is some logging of Solr, the log gets cluttered:
> {noformat}
> [11.01.16 09:14:19:170 CET] 000002a3 SystemOut O 09:14:19,169
> [zkCallback-14-thread-1-processing-My
> Custom
> MDC
> Parameter ROraqiFWaoXqP21gu4uLpMh SANDHO] WARN
> common.cloud.ConnectionManager [session=ROraqiFWaoXqP21gu4uLpMh]
> [user=SANDHO]: zkClient received AuthFailed
> {noformat}
> (some of my MDC-Parameters are only active in Email-Logs and are not
> included in the file-log)
> Solr should only put its own MDC-Parameter into the
> Thread-Name.
> Possible Solution: Since all (as far as i can check) invocations in Solr of
> MDC.put uses a Prefix like "ConcurrentUpdateSolrClient" or
> "CloudSolrClient" etc., it would be possible to put a check into
> MDCAwareThreadPoolExecutor.execute(Runnable) that process only those
> Prefixes.
> See also discussion on mailing list:
> Topic:Possible Bug - MDC handling in org.apache.solr.common.util.ExecutorUtil.MDCAwareThreadPoolExecutor.execute(Runnable)
> Date: Mon, 11 Jan 2016 09:00:43 GMT
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org