Open 0ctopus13prime opened 4 days ago
cc @shatejas for visibility. could you change the tag to enhancement? Thank you.
Since this will be a very straightforward refactor, will be included in PR that introduces a writing layer in native engines. RFC : https://github.com/opensearch-project/k-NN/issues/2033
Description
In NativeEngine990KnnVectorsReader's constructor, we construct cache keys for invalidating with the given segment reader state. But this is unnecessary, we can always construct with field infos and segment info when closing.
Not for sure, but once I tried to change it to have a reference in constructor and build a cache key in
close
method, I bumped into this exceptions during testing.Looks like it is relying on cluster state service to get KNN engine info, and it raised the exception which was not thrown if the logic was in constructor.
TO-BE :