You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "magibney (via GitHub)" <gi...@apache.org> on 2023/04/12 15:36:28 UTC

[GitHub] [solr] magibney commented on a diff in pull request #1557: SOLR-16677: Updated Solr to use new Lucene 9.5 storedFields() API

magibney commented on code in PR #1557:
URL: https://github.com/apache/solr/pull/1557#discussion_r1164311638


##########
solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java:
##########
@@ -372,7 +372,7 @@ public void doc(int docId, StoredFieldVisitor visitor) throws IOException {
       Document cached = doc(docId);
       visitFromCached(cached, visitor);
     } else {
-      searcher.getIndexReader().document(docId, visitor);
+      searcher.getIndexReader().storedFields().document(docId, visitor);

Review Comment:
   I actually don't think this will work. SolrDocumentFetcher is a singleton instance variable in SolrIndexSearcher, and the analogous previous calls were thread-safe by virtue of ThreadLocal. StoredField instances are not thread-safe.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org