[
https://issues.apache.org/jira/browse/SOLR-7381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar updated SOLR-7381:
----------------------------------------
Attachment: SOLR-7381.patch
# Added a new ExecutorUtils.MDCAwareThreadPoolExecutor class which sets the MDC
context of the caller thread and unsets after the runnable completes
# Added some helper methods in ExecutorUtils similar to the ones in Executors
# Used the above two throughout the code base
# Added the node name in the MDC context when running in cloud mode
Examples:
{code}
2531 T46 N:127.0.0.1:35418_zx_%2Ft oass.IndexSchema.readSchema default search
field in schema is text
2843 T50 N:127.0.0.1:35418_zx_%2Ft C:control_collection S:shard1
oascc.SolrZkClient.makePath makePath:
/collections/control_collection/leader_elect/shard1/election
7495 T73 N:127.0.0.1:35418_zx_%2Ft oascc.ZkStateReader.updateWatchedCollection
Updating data for collection1 to ver 6
23926 T62 N:127.0.0.1:60362_ oasc.SolrException.log ERROR
null:org.apache.zookeeper.KeeperException$SessionExpiredException:
KeeperErrorCode = Session expired for /aliases.json
at
org.apache.zookeeper.KeeperException.create(KeeperException.java:127)
at
org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
{code}
Still a few places to fix.
> Improve logging by adding MDC context in more places
> ----------------------------------------------------
>
> Key: SOLR-7381
> URL: https://issues.apache.org/jira/browse/SOLR-7381
> Project: Solr
> Issue Type: Improvement
> Components: SolrCloud
> Reporter: Shalin Shekhar Mangar
> Assignee: Shalin Shekhar Mangar
> Priority: Critical
> Fix For: 5.2
>
> Attachments: SOLR-7381.patch
>
>
> SOLR-6673 added MDC based logging in a few places but we have a lot of ground
> to cover. Threads created via thread pool executors do not inherit MDC values
> and those are some of the most interesting places to log MDC context. This is
> critical to help debug SolrCloud failures.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]