-
Notifications
You must be signed in to change notification settings - Fork 128
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
[Draft] Implement getCustomCodecService for EnginePlugin #229
[Draft] Implement getCustomCodecService for EnginePlugin #229
Conversation
Signed-off-by: John Mazanec <[email protected]>
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.
LGTM! Thanks
Codecov Report
@@ Coverage Diff @@
## main #229 +/- ##
============================================
- Coverage 83.21% 83.00% -0.21%
+ Complexity 864 859 -5
============================================
Files 123 122 -1
Lines 3777 3766 -11
Branches 358 358
============================================
- Hits 3143 3126 -17
- Misses 474 479 +5
- Partials 160 161 +1
Continue to review full report at Codecov.
|
|
||
@Override | ||
public Engine newReadWriteEngine(EngineConfig config) { | ||
codecService.setPostingsFormat(config.getCodec().postingsFormat()); |
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.
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.
Good catch. We would need this line otherwise it could be a breaking change. Reason for explicitly setting this is documented in PR opendistro-for-elasticsearch/k-NN#236
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.
Moving PR into draft state for now. I think we can refactor this a little bit.
Signed-off-by: John Mazanec [email protected]
Description
This PR implements the
getCustomCodecService
function of the EnginePlugin interface. That way, we do not have to override the entire engine factory for indices that use k-NN, just the CodecService. This will allow k-NN to be used with CCR plugin.Issues Resolved
#147
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.