-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make index.codec setting case-insensitive. #7171
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/index/engine/EngineConfig.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/codec/CodecService.java
Outdated
Show resolved
Hide resolved
I would expect an error, is this not the case? What if I specify This is an interface change that breaks bcw isn't it? If user was supplying |
…java Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: mulugetam <mulugeta.mammo@intel.com>
Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: mulugetam <mulugeta.mammo@intel.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
My bad, apparently the silent fallback has to do with OpenSearch-Benchmark (was using it for tests) and not OpenSearch. A direct REST call to OpenSearch with I think the question now is whether we should allow for a case-insensitive match. I think we should. The current compression codecs are all in lower case except ZSTD: |
OpenSearch-Benchmark bug report: opensearch-project/opensearch-benchmark#268 |
I vote for changing |
Thanks @mulugetam
I would genuinely be surprised if
|
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
throw new IllegalArgumentException( | ||
"unknown value for [index.codec] must be one of [default, best_compression] but was: " + s | ||
"unknown value for [index.codec] must be one of [default, best_compression, lucene_default] or " |
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.
If we're allowing for users to set it to lucene_default and/or one of the listed available codecs (Lucene80, Lucene70, etc), this needs to be documented on the static settings for index creation for index.codec setting.
Ref: https://opensearch.org/docs/2.4/api-reference/index-apis/create-index/#static-index-settings
server/src/main/java/org/opensearch/index/engine/EngineConfig.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
…java Co-authored-by: Poojita Raj <poojiraj@amazon.com> Signed-off-by: mulugetam <mulugeta.mammo@intel.com>
Gradle Check (Jenkins) Run Completed with:
|
Looks like @dblock @andrross @Poojita-Raj and for a case-sensitive |
Sure, thanks @mulugetam ! |
Description
OpenSearch currently supports
default
,best_compression
,lucene_default
, andZSTD
compression codecs forindex.codec
. The setting uses a case-sensitive comparison. If the user suppliesBEST_COMPRESSION
, for example, OpenSearch uses thedefault
(LZ4) codec and notbest_compression
(deflate).This PR addresses the issue by allowing a case-insensitive match for the setting.
Issues Resolved
index.codec: BEST_COMPRESSION
falls back todefault
(lz4) and notbest_compression
(deflate).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.