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


##########
lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsReader.java:
##########
@@ -123,4 +123,11 @@ public abstract void search(
   public KnnVectorsReader getMergeInstance() {
     return this;
   }
+
+  /**
+   * Optional: reset or close merge resources used in the reader
+   *
+   * <p>The default implementation is empty
+   */
+  public void finishMerge() throws IOException {}

Review Comment:
   How "sneaky" would it be to just update the read advice and return the same 
instance. Then restore the random read advice in finishMerge.   The reasonI 
suggest this is that so far all options and discussions lead to sharing the 
same underlying memory, so regardless on the actual instance type here, then 
the advice is going to change on the memory.
   



##########
lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsReader.java:
##########
@@ -123,4 +123,11 @@ public abstract void search(
   public KnnVectorsReader getMergeInstance() {
     return this;
   }
+
+  /**
+   * Optional: reset or close merge resources used in the reader
+   *
+   * <p>The default implementation is empty
+   */
+  public void finishMerge() throws IOException {}

Review Comment:
   How "sneaky" would it be to just update the read advice and return the same 
instance. Then restore the random read advice in finishMerge.   The reason I 
suggest this is that so far all options and discussions lead to sharing the 
same underlying memory, so regardless on the actual instance type here, then 
the advice is going to change on the memory.
   



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to