-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Added index.knn setting to list of unmodifiable settings when restore snapshot #16957
base: main
Are you sure you want to change the base?
Conversation
…napshot Signed-off-by: AnnTian Shao <[email protected]>
…napshot Signed-off-by: AnnTian Shao <[email protected]>
Signed-off-by: Tommy Shao <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16957 +/- ##
============================================
- Coverage 72.32% 72.22% -0.11%
+ Complexity 65310 65262 -48
============================================
Files 5299 5299
Lines 303534 303534
Branches 43941 43941
============================================
- Hits 219527 219216 -311
- Misses 66021 66347 +326
+ Partials 17986 17971 -15 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Tommy Shao <[email protected]>
❌ Gradle check result for f33c9bc: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@@ -271,6 +271,8 @@ static Setting<Integer> buildNumberOfShardsSetting() { | |||
Property.IndexScope | |||
); | |||
|
|||
public static final String SETTING_KNN_ENABLED = "index.knn"; |
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.
I am not sure if we should expose a plugin setting within core. Can you try adding in support for this behavior within the plugin using IndexEventListener
APIs?
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.
I'm pretty sure we shouldn't introduce some circular dependency of core to knn even logical, so +1 on #16957 (comment). There needs to be an interface/way to do it in the knn plugin.
Description
This change prevents customers to update index.knn setting when restoring a snapshot. The PR is related to another PR (opensearch-project/k-NN#2348) which fixes a bug by making index.knn setting immutable after index creation. However, that PR doesn't cover the case for snapshots, so this PR updates index.knn to be immutable when restoring an index from a snapshot.
Related Issues
Resolves Issue 2334 in KNN repository: opensearch-project/k-NN#2334
Check List
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.