-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Zstd new codec is a breaking change for kNN plugin #7012
Comments
Thanks @martin-gaievski , this is very interesting - the ZSTD (basically, additional codecs) is the sandbox plugin and should not be bundled/installed by default. |
Ah ... I found it https://github.com/opensearch-project/OpenSearch/blob/main/distribution/build.gradle#L242
|
this is a module, not a plugin.
right, for module it's different. |
@mulugetam I think we should move |
@reta @martin-gaievski Will create a new PR that does just that. |
@mulugetam already did |
@reta This should work once custom-codecs is moved to Plugins folder in sandbox. From feature standpoint this looks an interesting feature. Once the change is made we should also think about how other plugins which provide their own codec can take advantage of this new zstd codec. Happy to discuss this more on a separate issue or this same issue. Another point, did we consider adding this codec as part of Lucene itself? |
Thanks @navneet1v
Yes, it is actually the reverse: codec was suggested to Lucene first and rejected due to JNI concerns, see please apache/lucene#439 |
Thanks @reta . I was not aware of this. |
@martin-gaievski The fix has been merged in and backported. Please reopen if the issue still exists. |
Do I understand correctly that to enable ZSTD as is I would have to disable k-nn? Do we have an issue open for the long term fix? |
There is no issue opened, but we need that. Atleast we got to know about this feature today morning, hence we have not thought about it. Also, another thing is this is a custom codec, I believe that there should be an index setting which tells this codec should be enabled or not for an index, rather than applying to all indices. Atleast to my knowledge I don't see that in this code change. @dblock I hope this ans your question. |
@dblock Yes, I think we should have an issue open for that. @navneet1v User has to set it explicitly: |
@mulugetam will you please create one for supporting multiple? |
Hi @mulugetam |
…NODICT. - addresses opensearch-project#7012 Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
- addresses opensearch-project#7012 Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
* Fix: enable ZSTD codec only if index.codec is set to ZSTD. - addresses #7012 Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> * Removed custom CodecService and CodecServiceFactory classes. - Removed custom classes for CodecService and CodecServiceFactory. - Also removed PerFieldMappingPostingFormatCodec -- not required. - Added documentation. Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> * Bump zstd-jni version from 1.5.4-1 to 1.5.5-1. - Zstandard version 1.5.5 contains a bug fix for a rare corruption error described here: https://github.com/facebook/zstd/releases/tag/v1.5.5. The zstd-jni version we use here, 1.5.5-1, uses Zstandard v1.5.5. Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> --------- Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
* Fix: enable ZSTD codec only if index.codec is set to ZSTD. - addresses #7012 Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> * Removed custom CodecService and CodecServiceFactory classes. - Removed custom classes for CodecService and CodecServiceFactory. - Also removed PerFieldMappingPostingFormatCodec -- not required. - Added documentation. Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> * Bump zstd-jni version from 1.5.4-1 to 1.5.5-1. - Zstandard version 1.5.5 contains a bug fix for a rare corruption error described here: https://github.com/facebook/zstd/releases/tag/v1.5.5. The zstd-jni version we use here, 1.5.5-1, uses Zstandard v1.5.5. Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> --------- Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> (cherry picked from commit 569e90c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…7149) * Fix: enable ZSTD codec only if index.codec is set to ZSTD. - addresses #7012 * Removed custom CodecService and CodecServiceFactory classes. - Removed custom classes for CodecService and CodecServiceFactory. - Also removed PerFieldMappingPostingFormatCodec -- not required. - Added documentation. * Bump zstd-jni version from 1.5.4-1 to 1.5.5-1. - Zstandard version 1.5.5 contains a bug fix for a rare corruption error described here: https://github.com/facebook/zstd/releases/tag/v1.5.5. The zstd-jni version we use here, 1.5.5-1, uses Zstandard v1.5.5. --------- (cherry picked from commit 569e90c) Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rch-project#7037) * Fix: enable ZSTD codec only if index.codec is set to ZSTD. - addresses opensearch-project#7012 Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> * Removed custom CodecService and CodecServiceFactory classes. - Removed custom classes for CodecService and CodecServiceFactory. - Also removed PerFieldMappingPostingFormatCodec -- not required. - Added documentation. Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> * Bump zstd-jni version from 1.5.4-1 to 1.5.5-1. - Zstandard version 1.5.5 contains a bug fix for a rare corruption error described here: https://github.com/facebook/zstd/releases/tag/v1.5.5. The zstd-jni version we use here, 1.5.5-1, uses Zstandard v1.5.5. Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> --------- Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Describe the bug
Plugins cannot continue to use existing approach and register CodecServiceFactory and cluster is crushing in runtime (compile time is ok). Example is kNN plugin, error on cluster start:
https://github.com/opensearch-project/k-NN/actions/runs/4614564115/jobs/8170344936#step:9:1265
Code on kNN side that is registering CustomServiceFactory:
https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java#L271-L276
To Reproduce
Steps to reproduce the behavior:
./gradlew run
Expected behavior
There should be alternative way of either enabling/disabling plugins or for plugin to register their CustomServiceFactory.
Plugins
distribution build, k-NN is included
Additional context
Core change introduced in #3577
Part of PR that is registering new factory: https://github.com/opensearch-project/OpenSearch/pull/3577/files#diff-629964cdbeae1039851179519fc3e3d3cc45e8329d208dd9f2b7034537675262R38
Core code where the check for only one factory is happening: https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/engine/EngineConfigFactory.java#L79
The text was updated successfully, but these errors were encountered: