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

Add rolling version upgrade support for ignore_unmapped #1770

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

Conversation

kotwanikunal
Copy link
Member

@kotwanikunal kotwanikunal commented Jun 25, 2024

Description

  • Adds in rolling version upgrade support for ignore_unmapped

Issues Resolved

  • N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --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.

@navneet1v
Copy link
Collaborator

@kotwanikunal thanks for raising the PR. Will wait for all BWC to gh actions to complete.

@navneet1v
Copy link
Collaborator

@kotwanikunal can you fix the failed GH actions?

@martin-gaievski
Copy link
Member

Good finding, we should do same in other repos. Will approve once CI is fixed. Current error is from spotless, you can run spotlessApply

@kotwanikunal
Copy link
Member Author

Pushed linting fixes in.

@kotwanikunal
Copy link
Member Author

Looks related to the change. Let me take a look

> Task :test

Tests with failures:
 - org.opensearch.knn.index.query.KNNQueryBuilderTests.testSerialization

@@ -324,7 +326,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeFloatArray(vector);
out.writeInt(k);
out.writeOptionalNamedWriteable(filter);
if (isClusterOnOrAfterMinRequiredVersion("ignore_unmapped")) {
if (out.getVersion().onOrAfter(getMinVersionForFeature("ignore_unmapped"))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this stream guarantee the min version of the cluster. Just verifying since the previous method has that check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a historical reason that we look for the cluster version and not the stream version?
It should behave the same - a feature is on only when both the nodes are upgraded.

@jmazanec15 / @navneet1v

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't serialized the stream version when we write KNNQueryBuilder at first. Therefore, we were not able to use stream version. After that, we haven't tried to add stream version because cluster version just worked fine for us.

@jmazanec15
Copy link
Member

@kotwanikunal is there pending?

@kotwanikunal kotwanikunal force-pushed the rolling-version-support branch from 7550f9e to 3aa15a2 Compare October 29, 2024 23:05
@kotwanikunal
Copy link
Member Author

@kotwanikunal is there pending?

I had a rebase pending.
Updated the PR with latest references.

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

Successfully merging this pull request may close these issues.

6 participants