dsmiley commented on issue #1368: SOLR-14351: Fix/improve MDCLoggingContext 
usage
URL: https://github.com/apache/lucene-solr/pull/1368#issuecomment-604680265
 
 
   I was thinking that maybe there is a way to reduce the number of places we 
even have to think about set/clear of the MDC.  In the last commit here I 
explore that idea.  SolrCore.open (called whenever a core is retrieved from 
CoreContainer) now calls set on the MDC, and close (it's ref-counted) clears 
it.  I was then able to remove a bunch of callers, and perhaps in the process 
enhanced the scope of this context to some callers' callers that made sense.  
On the down side, it might be argued this is surprising side-effect behavior 
that doesn't _belong_ on the open/close of getting a core reference; I dunno.  
I think I like it though I'm slightly worried I missed something since this 
sort of thing isn't really tested well so I'm relying on all of us to notice 
and report missing or wrong MDC info.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to