-
Notifications
You must be signed in to change notification settings - Fork 140
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
Remove DocsWithFieldSet reference from NativeEngineFieldVectorsWriter #2408
Conversation
Signed-off-by: Wei Wang <[email protected]>
0c8986c
to
d8342af
Compare
Signed-off-by: Wei Wang <[email protected]>
d8342af
to
cad7f9b
Compare
@weiwang118 please fix the changelog conflicts. Overall code looks good to me. |
@weiwang118 this is a good start. We should on how we can remove the limitation of vectors too. We can keep the scope this PR limited for now. |
...a/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsWriterFlushTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Wei Wang <[email protected]>
Signed-off-by: Wei Wang <[email protected]>
14cdf90
to
e21cc64
Compare
The major benefit comes from reusing the vectors from FlatVectorWriter, that will significantly reduce the JVM heap usage during indexing. I am fine with tackling it iteratively as @navneet1v suggested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-2408-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d58d133c6edb9dfc48b5c3e507cdc21dbf0477ad
# Push it to GitHub
git push --set-upstream origin backport/backport-2408-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
@weiwang118 please do a manual backport |
…opensearch-project#2408) * Remove DocsWithFieldSet reference from NativeEngineFieldVectorsWriter Signed-off-by: Wei Wang <[email protected]> * fix typo error in test file Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Signed-off-by: Wei Wang <[email protected]> (cherry picked from commit d58d133)
…opensearch-project#2408) * Remove DocsWithFieldSet reference from NativeEngineFieldVectorsWriter Signed-off-by: Wei Wang <[email protected]> * fix typo error in test file Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Signed-off-by: Wei Wang <[email protected]> (cherry picked from commit d58d133)
…opensearch-project#2408) * Remove DocsWithFieldSet reference from NativeEngineFieldVectorsWriter Signed-off-by: Wei Wang <[email protected]> * fix typo error in test file Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Signed-off-by: Wei Wang <[email protected]> (cherry picked from commit d58d133)
…#2408) (#2426) * Remove DocsWithFieldSet reference from NativeEngineFieldVectorsWriter Signed-off-by: Wei Wang <[email protected]> * fix typo error in test file Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Signed-off-by: Wei Wang <[email protected]> (cherry picked from commit d58d133)
Description
This change aims to resolve the issue #2207 .
After deep research, I found out although FlatFieldVectorsWriter exposes
vectors
andDocsWithFieldSet
, but the type ofvectors
is List, however, thevectors
in NativeEngineFieldVectorsWriter is Map<Integer, T>.(Reason see below)So in this pr, I only remove the reference of DocsWithFieldSet from NativeEngineFieldVectorsWriter and keep the original vectors variable there.
Related Issues
Resolves #2207
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.