Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

anntians
Copy link

@anntians anntians commented Jan 6, 2025

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

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Copy link
Contributor

github-actions bot commented Jan 6, 2025

✅ Gradle check result for 4a659c0: SUCCESS

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.22%. Comparing base (4a53ff2) to head (4a659c0).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jan 7, 2025

❌ 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";
Copy link
Member

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?

https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/shard/IndexEventListener.java

Copy link
Member

@dblock dblock left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants