[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483820#comment-16483820 ] Shalin Shekhar Mangar commented on SOLR-11880: -- Taking another look at this one. The distributed update and search requests are the most frequent users of this executor. Tracing each, I see that the Runnable added by HttpShardHandler.submit, SolrCmdDistributor.submit and StreamingSolrClients.ErrorReportingConcurrentUpdateSolrClient never throw any exceptions but they are tracked and logged as part of the shard response or similar classes. Therefore there is no point in creating an Exception object for these two usages. So, this patches adds another constructor for MDCAwareThreadPoolExecutor which disables the submitter stack trace for search and update use-cases. > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Assignee: Noble Paul >Priority: Minor > Attachments: SOLR-11880.patch > > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346640#comment-16346640 ] ASF subversion and git services commented on SOLR-11880: Commit 0b0e8e5e7a67362c5757c1df4cee249ad193b51b in lucene-solr's branch refs/heads/master from [~noble.paul] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0b0e8e5 ] SOLR-11880: ref-guide > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Assignee: Noble Paul >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346642#comment-16346642 ] ASF subversion and git services commented on SOLR-11880: Commit 32ca9cf4d83731511c0cdfa073659247959677cc in lucene-solr's branch refs/heads/branch_7x from [~noble.paul] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=32ca9cf ] SOLR-11880: ref-guide > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Assignee: Noble Paul >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346905#comment-16346905 ] Cassandra Targett commented on SOLR-11880: -- [~noble.paul] - I suspect the commits so far here were actually meant for SOLR-11067? > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Assignee: Noble Paul >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16347545#comment-16347545 ] Noble Paul commented on SOLR-11880: --- [~ctargett] right. this is what happens when you work on multiple tickets at the same time ;) > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Assignee: Noble Paul >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334607#comment-16334607 ] Shalin Shekhar Mangar commented on SOLR-11880: -- If we remove that exception then we're running blind. There would be no way to get the stack trace of the submitter when an actual exception happens inside the executor thread. > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16335396#comment-16335396 ] Noble Paul commented on SOLR-11880: --- We should create a custom Exception which doesn't fillInStackTrace() in constructor. we can do the fillInStackTrace lazily > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-11880) Avoid creating new exceptions for every request made via MDCAwareThreadPoolExecutor
[ https://issues.apache.org/jira/browse/SOLR-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16335473#comment-16335473 ] Shalin Shekhar Mangar commented on SOLR-11880: -- I don't think that is possible. If we want the caller's stack trace then we either call fillInStackTrace at the point of the call or we use a cached copy from the right place. If this is indeed a bottleneck (and I am not sure that it is) then we can either eliminate the submitter stack trace with a flag or do something ugly/clever like having the caller of execute method pass down a static exception object > Avoid creating new exceptions for every request made via > MDCAwareThreadPoolExecutor > --- > > Key: SOLR-11880 > URL: https://issues.apache.org/jira/browse/SOLR-11880 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Varun Thacker >Priority: Minor > > MDCAwareThreadPoolExecutor has this line in it's{{{execute}} method > > {code:java} > final Exception submitterStackTrace = new Exception("Submitter stack > trace");{code} > This means that every call via the a thread pool will create this exception, > and only when it sees an error will it be used. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org