risdenk commented on code in PR #818: URL: https://github.com/apache/solr/pull/818#discussion_r866261735
########## solr/core/src/java/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java: ########## @@ -274,6 +273,11 @@ public void writeResults(ResultContext ctx, JavaBinCodec codec) throws IOExcepti req.close(); SolrRequestInfo.clearRequestInfo(); } + // NOTE: `req` must be closed _before_ core, because `req` can hold a reference to + // SolrIndexSearcher which can in some cases block `core.close()` from completing + // successfully (by holding a reference to a core Directory). Hence we cannot trivially + // use try-with-resources to close `core`. + core.close(); Review Comment: couldn't `req = _parser.buildRequestFrom(core, params, getContentStreams(request));` be a try w/ resources instead of trying to do that outside with solrcore? -- 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