[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-05-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17106763#comment-17106763
 ] 

ASF subversion and git services commented on SOLR-14351:


Commit f00b38d004831512de21ed1f8289b2e939dafbd3 in lucene-solr's branch 
refs/heads/branch_8x from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=f00b38d ]

SOLR-14351: commitScheduler was missing MDC logging (#1498)

(cherry picked from commit 4b9808a03d6c8ee1f1f71487372a689b6c5f9798)


> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
> Fix For: 8.6
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-05-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17106761#comment-17106761
 ] 

ASF subversion and git services commented on SOLR-14351:


Commit 4b9808a03d6c8ee1f1f71487372a689b6c5f9798 in lucene-solr's branch 
refs/heads/master from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=4b9808a ]

SOLR-14351: commitScheduler was missing MDC logging (#1498)



> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
> Fix For: 8.6
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-05-03 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17098453#comment-17098453
 ] 

ASF subversion and git services commented on SOLR-14351:


Commit 6c9024f77358ae1f372b3078691ada3f64a84e59 in lucene-solr's branch 
refs/heads/branch_8x from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6c9024f ]

SOLR-14351: Oops; add back null check for ZkController

(cherry picked from commit e7c7a62a84927cf6c49d75229f9ebfbe2feb9df9)


> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
> Fix For: 8.6
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-05-03 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17098451#comment-17098451
 ] 

ASF subversion and git services commented on SOLR-14351:


Commit e7c7a62a84927cf6c49d75229f9ebfbe2feb9df9 in lucene-solr's branch 
refs/heads/master from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=e7c7a62 ]

SOLR-14351: Oops; add back null check for ZkController


> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
> Fix For: 8.6
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-05-03 Thread David Smiley (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17098250#comment-17098250
 ] 

David Smiley commented on SOLR-14351:
-

Looks like I goofed in ZkContainer.java in which I removed the check 
zkController != null.  Consequently, in _standalone mode_, you'll see 
NullPointerException errors (actually benign) with a stack looking like:

at org.apache.solr.core.ZkContainer.lambda$registerInZk$1(ZkContainer.java:195) 
at org.apache.solr.core.ZkContainer.lambda$registerInZk$1(ZkContainer.java:195) 
at org.apache.solr.core.ZkContainer.registerInZk(ZkContainer.java:224)

etc.

I'll push a fix tomorrow with some updated javadocs on this ZkContainer class.

> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
> Fix For: 8.6
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-04-03 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17075008#comment-17075008
 ] 

ASF subversion and git services commented on SOLR-14351:


Commit fd96a6c8cd1380310d69d28e48e57954bfa8c41b in lucene-solr's branch 
refs/heads/branch_8x from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=fd96a6c ]

SOLR-14351: Fix/improve MDCLoggingContext usage
* Some set/clear were not balanced.
* Harden clear() in case of imbalance.
* Sometimes coreContainger.getCore was called unnecessarily; just need a 
descriptor
* SolrCore.open/close now calls MDCLoggerContext.setCore/clear
* no need to clear MDC in HttpSolrCall


> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-04-03 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17075007#comment-17075007
 ] 

ASF subversion and git services commented on SOLR-14351:


Commit 1aeefc25d1ae5e1a56cce333f57c6f044da372de in lucene-solr's branch 
refs/heads/master from David Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=1aeefc2 ]

SOLR-14351: Fix/improve MDCLoggingContext usage
* Some set/clear were not balanced.
* Harden clear() in case of imbalance.
* Sometimes coreContainger.getCore was called unnecessarily; just need a 
descriptor
* SolrCore.open/close now calls MDCLoggerContext.setCore/clear
* no need to clear MDC in HttpSolrCall


> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-03-26 Thread David Smiley (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17068030#comment-17068030
 ] 

David Smiley commented on SOLR-14351:
-

I pushed that as a commit to the PR. Lets review there.

> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-03-26 Thread David Smiley (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17067993#comment-17067993
 ] 

David Smiley commented on SOLR-14351:
-

I played with this idea a bit locally.  Two issues:
* a try-with-resources demands you declare a local variable to store the 
AutoCloseable thing.  That means we need to declare an instance of something 
that's AutoCloseable and give it a name.
* AutoCloseable.close declares it throws Exception.  To avoid the caller seeing 
this, we'd want to perhaps have MDCLoggingContext implement AutoCloseable and 
declare close but not throw an exception.

I wonder if CoreContainer.getCore ought to bump the logging context? since it's 
ref-counted and thus could clear on close.   H

> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-03-26 Thread Mike Drob (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17067985#comment-17067985
 ] 

Mike Drob commented on SOLR-14351:
--

Leave a comment, file a JIRA, move on with other things?

> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-03-26 Thread David Smiley (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17067980#comment-17067980
 ] 

David Smiley commented on SOLR-14351:
-

Your suggestion is complementary and not a different design but an additional 
design going beyond what I did.

I'm not sure if it's worth the trouble given it's not a big deal when we mess 
this up; not that we don't care but it's not the level of seriousness as 
resource-closing / memory-leaks.  Things are hard-reset for the next request.  
Also, some places, namely HttpSolrCall doesn't balance in a lexical context 
with the clear/reset.  Granted that case could simply be an exception; your 
suggestion doesn't insist on a try-finally always.  Shrug, I dunno.

> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SOLR-14351) Harden MDCLoggingContext.clear depth tracking

2020-03-26 Thread Mike Drob (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-14351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17067931#comment-17067931
 ] 

Mike Drob commented on SOLR-14351:
--

As I was looking through the PR, I had an idea for a slightly different design 
decision...

 

If instead of null, be return an AutoCloseable, then we don't have to have 
developers remember to call clear at the end. And we would get compiler 
warnings where we miss it. Maybe it wouldn't work with the ThreadLocal and 
static context, but it might be worth exploring.

> Harden MDCLoggingContext.clear depth tracking
> -
>
> Key: SOLR-14351
> URL: https://issues.apache.org/jira/browse/SOLR-14351
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> MDCLoggingContext tracks recursive calls and only clears when the recursion 
> level is back down to 0.  If a caller forgets to register and ends up calling 
> clear any ways, then this can mess things up.  Additionally I found at least 
> one place this is occurring, which led me to investigate this matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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