ChrisHegarty commented on code in PR #16769:
URL: https://github.com/apache/lucene/pull/16769#discussion_r4205296782


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsReader.java:
##########
@@ -218,42 +224,55 @@ public FlatVectorsReader getMergeInstance() throws 
IOException {
       return mergeInstance;
     } finally {
       if (success == false) {
-        original.releaseMergeVectorData();
+        original.release();
       }
     }
   }
 
+  /**
+   * Whether a merge has to map the file again: only when searches read it at 
random. Otherwise the
+   * mapping searches use carries no advice a merge reading front to back 
would suffer from, and a
+   * reader a merge opened already reads the file the way a merge does.
+   */
+  private boolean mergeNeedsItsOwnMapping() {
+    return dataContext.context() != IOContext.Context.MERGE
+        && dataContext.hints().contains(DataAccessHint.RANDOM);

Review Comment:
   The merge no longer always gets the sequential read-ahead and no-reuse 
benefits that #16749 added. But that should be fine - the point of this change. 
Should we clarify that in the changelog entry for  #16749



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to