-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Having a reference to the state in KNN990 vector reader, then construct cache keys to invalidate in close method. #2223
Comments
cc @shatejas for visibility. |
Since this will be a very straightforward refactor, will be included in PR that introduces a writing layer in native engines. |
Hi @shatejas In addition to that, deciding the caller is not controllable in codec, for example, the index closing API will be handled within the cluster state update thread, which will eventually close KNN vector codec. We can avoid this by having a map of KNN engine meta data, which I think is bit pointless since the motivation of this working was to save unnecessary bytes. I think if either way we need to cache something in memory, and given that only few bytes (at most 1KB I believe) is what we can save, can we keep the cached strings then use it in close method? (e.g. keep it as it is)
|
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 :
The text was updated successfully, but these errors were encountered: