dsmiley commented on a change in pull request #227: URL: https://github.com/apache/solr/pull/227#discussion_r672780636
########## File path: solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java ########## @@ -196,7 +198,13 @@ public void execute(final Runnable command) { String ctxStr = contextString.toString().replace("/", "//"); final String submitterContextStr = ctxStr.length() <= MAX_THREAD_NAME_LEN ? ctxStr : ctxStr.substring(0, MAX_THREAD_NAME_LEN); - final Exception submitterStackTrace = enableSubmitterStackTrace ? new Exception("Submitter stack trace") : null; + final Exception submitterStackTrace; + if (enableSubmitterStackTrace) { + Exception grandParentSubmitter = submitter.get(); + submitterStackTrace = new Exception("Submitter stack trace", grandParentSubmitter); Review comment: Hmm; isn't this one of those cases we should call fillInStackTrace() on the exception because we don't throw it? ########## File path: solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java ########## @@ -196,7 +198,13 @@ public void execute(final Runnable command) { String ctxStr = contextString.toString().replace("/", "//"); final String submitterContextStr = ctxStr.length() <= MAX_THREAD_NAME_LEN ? ctxStr : ctxStr.substring(0, MAX_THREAD_NAME_LEN); - final Exception submitterStackTrace = enableSubmitterStackTrace ? new Exception("Submitter stack trace") : null; + final Exception submitterStackTrace; + if (enableSubmitterStackTrace) { + Exception grandParentSubmitter = submitter.get(); + submitterStackTrace = new Exception("Submitter stack trace", grandParentSubmitter); Review comment: Ah nevermind 👍 ########## File path: solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java ########## @@ -196,7 +198,13 @@ public void execute(final Runnable command) { String ctxStr = contextString.toString().replace("/", "//"); final String submitterContextStr = ctxStr.length() <= MAX_THREAD_NAME_LEN ? ctxStr : ctxStr.substring(0, MAX_THREAD_NAME_LEN); - final Exception submitterStackTrace = enableSubmitterStackTrace ? new Exception("Submitter stack trace") : null; + final Exception submitterStackTrace; Review comment: Why create Exception specifically -- why not do Throwable? -- 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. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org