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

[Backport 2.x] Fixed a bug to prevent updating index.knn setting after index creation #2379

Conversation

anntians
Copy link
Contributor

Description

This change prevents customers to update index.knn setting after creating an index. Previously, there was a loophole to migrate a live k-nn index from hot to UW by closing the index, setting index.knn to false, opening the index, and migrating to UW. However, migrating k-nn indices to UW nodes is not supported. Thus, this PR updates index.knn to be FINAL and immutable after index creation.

Related Issues

Resolves #2334

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@jmazanec15 jmazanec15 changed the title Fixed a bug to prevent updating index.knn setting after index creation [Backport 2.x] Fixed a bug to prevent updating index.knn setting after index creation Jan 10, 2025
opensearch-project#2348)

* Change index.knn setting to FINAL, immutable after index creation

Signed-off-by: AnnTian Shao <[email protected]>

* Add to ChangeLog the description of bug fix

Signed-off-by: AnnTian Shao <[email protected]>

* Add restart upgrade test for checking immutability of knn.index setting after version upgrade

Signed-off-by: Tommy Shao <[email protected]>

---------

Signed-off-by: AnnTian Shao <[email protected]>
Signed-off-by: Tommy Shao <[email protected]>
Signed-off-by: Tommy Shao <[email protected]>
Co-authored-by: AnnTian Shao <[email protected]>
(cherry picked from commit a875eb8)
Signed-off-by: AnnTian Shao <[email protected]>
@anntians anntians force-pushed the backport/backport-2348-to-2.x branch from ed10f2d to b38aefb Compare January 10, 2025 18:00
@anntians anntians closed this Jan 10, 2025
@anntians anntians deleted the backport/backport-2348-to-2.x branch January 10, 2025 18:32
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.

1 participant