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


##########
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 here, then the 
advice is going to change on the memory.
   
   Makes sense to me, and if we switch to `close` we can switch to the approach 
mentioned by @jpountz in 
https://github.com/apache/lucene/pull/13985#discussion_r1835532510



-- 
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