SOLR-9507: Correctly set MDC values for CoreContainer threads

This commit is contained in:
Alan Woodward 2016-09-16 13:33:07 +01:00
parent 84e01eb84b
commit 5610fd9df2
2 changed files with 5 additions and 0 deletions

View File

@ -129,6 +129,9 @@ Bug Fixes
* SOLR-9484: The modify collection API should wait for the modified properties to show up in the
cluster state. (Cao Manh Dat, shalin)
* SOLR-9507: CoreContainer threads now correctly set their MDC logging values
(Alan Woodward)
Optimizations
----------------------

View File

@ -459,6 +459,8 @@ public class CoreContainer {
zkSys.initZooKeeper(this, solrHome, cfg.getCloudConfig());
if(isZooKeeperAware()) pkiAuthenticationPlugin = new PKIAuthenticationPlugin(this, zkSys.getZkController().getNodeName());
MDCLoggingContext.setNode(this);
ZkStateReader.ConfigData securityConfig = isZooKeeperAware() ? getZkController().getZkStateReader().getSecurityProps(false) : new ZkStateReader.ConfigData(EMPTY_MAP, -1);
initializeAuthorizationPlugin((Map<String, Object>) securityConfig.data.get("authorization"));
initializeAuthenticationPlugin((Map<String, Object>) securityConfig.data.get("authentication"));