-
Notifications
You must be signed in to change notification settings - Fork 123
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 FileWatcher from KNN. #2182
Remove FileWatcher from KNN. #2182
Conversation
@jmazanec15 |
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN80Codec/KNN80DocValuesProducer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/util/KNNCodecUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Outdated
Show resolved
Hide resolved
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.
Do verify the latencies as well since you are doing the benchmarking
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/util/KNNCodecUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN80Codec/KNN80DocValuesProducer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/memory/NativeMemoryCacheManager.java
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/memory/NativeMemoryAllocation.java
Outdated
Show resolved
Hide resolved
… it to other. Signed-off-by: Dooyong Kim <[email protected]>
Signed-off-by: Dooyong Kim <[email protected]>
Signed-off-by: Dooyong Kim <[email protected]>
Signed-off-by: Dooyong Kim <[email protected]>
Signed-off-by: Dooyong Kim <[email protected]>
f8638be
to
94058d3
Compare
Signed-off-by: Dooyong Kim <[email protected]>
yeah, that's the plan. |
Signed-off-by: Dooyong Kim <[email protected]>
Please note that in |
Found few testing cases are not updated according to this change. |
Performance Benchmark ComparisonConclusion : I could not find an implication that having this change would degrade performance. <style> </style>
|
Signed-off-by: Dooyong Kim <[email protected]>
@@ -562,8 +562,10 @@ public static boolean isFaissAVX2Disabled() { | |||
|
|||
public static boolean isFaissAVX512Disabled() { | |||
return Booleans.parseBoolean( | |||
KNNSettings.state().getSettingValue(KNNSettings.KNN_FAISS_AVX512_DISABLED).toString(), |
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.
KNNSettings.state().getSettingValue(KNNSettings.KNN_FAISS_AVX512_DISABLED)
can return null
value, so we should not call toString
without checking its nullity.
src/main/java/org/opensearch/knn/index/codec/util/NativeMemoryCacheKeyHelper.java
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/util/KNNCodecUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/NativeEngines990KnnVectorsReader.java
Show resolved
Hide resolved
1a52a1b
to
6c4fe69
Compare
src/main/java/org/opensearch/knn/index/codec/util/KNNCodecUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/codec/util/KNNCodecUtil.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Dooyong Kim <[email protected]>
a8494a0
to
bb677d6
Compare
Signed-off-by: Doo Yong Kim <[email protected]>
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, waiting for the CI to pass
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.
LGTM
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-2182-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e5599aa151cf43700d0ea327ad536cc106e5bb61
# Push it to GitHub
git push --set-upstream origin backport/backport-2182-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 |
Looks like auto backporting is failing. Will raise a backport PR shortly. |
Signed-off-by: Dooyong Kim <[email protected]> (cherry picked from commit e5599aa)
Backport PR : #2225 |
Signed-off-by: Dooyong Kim <[email protected]> (cherry picked from commit e5599aa)
Signed-off-by: Dooyong Kim <[email protected]> (cherry picked from commit e5599aa)
Description
Design doc : #1885 (comment)
This PR is to remove FileWatcher from KNN.
FileWatcher periodically monitors a vector index file then clean up resource once it is deleted.
However, as outlined in the doc above, releasing allocated native memory is well being dealt with in 80DV Producer already. Therefore, we can safely remove FileWatcher.
Just that, in since the newest version is now using vector format, I've added the same cleaning logic in there as well.
Related Issues
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.