-
Notifications
You must be signed in to change notification settings - Fork 134
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
Bump lucene codec to 99 #1383
Bump lucene codec to 99 #1383
Conversation
Signed-off-by: Naveen Tatikonda <[email protected]>
Signed-off-by: Naveen Tatikonda <[email protected]>
Signed-off-by: Naveen Tatikonda <[email protected]>
Signed-off-by: Naveen Tatikonda <[email protected]>
Signed-off-by: Naveen Tatikonda <[email protected]>
@naveentatikonda CI is failing for mac. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1383 +/- ##
============================================
- Coverage 85.17% 84.87% -0.31%
+ Complexity 1261 1259 -2
============================================
Files 163 165 +2
Lines 5114 5138 +24
Branches 480 480
============================================
+ Hits 4356 4361 +5
- Misses 553 572 +19
Partials 205 205 ☔ View full report in Codecov by Sentry. |
Yes, CI is failing on macOS with below error. Not sure what was the exact reason. Guessing if something was wrong while publishing the changes by core to maven because it is a valid class and working fine for other OS.
|
can we confirm with core team on this? |
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 think we need to add into this PR capability of providing segmentInfo format. Tests are not critical and can be fixed later, but adding a format should be part of the codec version bump.
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/KNN990Codec.java
Show resolved
Hide resolved
I don't think so we need that. The older codecs are just used for reading the segment files and not for doing any kind of writes on the segment info file(we can see that BWC are successful here). What the issue happening in unit tests is we are using unit test to create a proper segment with a codec that doesn't support writing to segment files. I think we should just remove these unit tests as they are not required and keep the unit test for the latest codec. Nevertheless I synced with @naveentatikonda and asked him to verify this understanding again by doing some kind of manual tests or adding a BWC tests where after upgrade we delete few documents and then do a query. |
Agree for tests for older codecs, we can keep |
I think we need that extra layer of abstraction to allow usage of delegate codec in classes that may extend for our knn codec class. It was the idea why the format facade class is needed at the first place, maybe things changed now. Otherwise it will use format from default delegate as per parent class implementation in lucene, that's why it's not failing for us. |
Here to just try understanding the changes added in the PR |
src/test/java/org/opensearch/knn/index/codec/KNN910Codec/KNN910CodecTests.java
Outdated
Show resolved
Hide resolved
Do we have such classes? I have not seen such classes. |
@martin-gaievski For docValues and compound format, we have our custom logic which require us to override get methods for those. For segment info, I don't understand why we need same pattern. What does |
@martin-gaievski if a any other plugin is using the KNNCodec then they should also start depending on the latest codec of K-NN. Just like k-NN relies on the latest codec from lucene and we upgrade every time there is an upgrade. One this which we are not doing is moving the codec to a package which has |
It was an assumption at the time that facade was added, that users can extend our knn codec or use their own delegate. I haven't seen such classes either. |
c68c012
to
b42a537
Compare
While this statement makes sense, especially regarding moving old codecs to a separate package, my point was different. I was referring to an option of passing custom delegate using constructor with args. It's not necessarily lucene codec implementation. Currently if user uses this constructor and passes their own codec we will take doc value and compound formats from that delegate. |
Signed-off-by: Naveen Tatikonda <[email protected]>
b42a537
to
accf812
Compare
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.
let's address concerns raised here in next PR
45e9e54
into
opensearch-project:main
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-1383-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 45e9e542aef60ef7073ee726e6ac14dec27bfa04
# Push it to GitHub
git push --set-upstream origin backport/backport-1383-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 |
* Add Lucene Codec 9.9 Signed-off-by: Naveen Tatikonda <[email protected]> * Fix import statements for Lucene95 Codec Signed-off-by: Naveen Tatikonda <[email protected]> * Fix SegmentInfo Constructor in Test Signed-off-by: Naveen Tatikonda <[email protected]> * Temporarily Ignore Old Codec Tests Signed-off-by: Naveen Tatikonda <[email protected]> * Add CHANGELOG Signed-off-by: Naveen Tatikonda <[email protected]> * Delete Old Codec Tests Signed-off-by: Naveen Tatikonda <[email protected]> --------- Signed-off-by: Naveen Tatikonda <[email protected]> (cherry picked from commit 45e9e54)
* Add Lucene Codec 9.9 Signed-off-by: Naveen Tatikonda <[email protected]> * Fix import statements for Lucene95 Codec Signed-off-by: Naveen Tatikonda <[email protected]> * Fix SegmentInfo Constructor in Test Signed-off-by: Naveen Tatikonda <[email protected]> * Temporarily Ignore Old Codec Tests Signed-off-by: Naveen Tatikonda <[email protected]> * Add CHANGELOG Signed-off-by: Naveen Tatikonda <[email protected]> * Delete Old Codec Tests Signed-off-by: Naveen Tatikonda <[email protected]> --------- Signed-off-by: Naveen Tatikonda <[email protected]> (cherry picked from commit 45e9e54)
Description
This PR includes the following changes:
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.