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

Use lowercase letters for zstd, zstdnodict compression codecs. #7231

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

mulugetam
Copy link
Contributor

Description

OpenSearch supports: default, lucene_default, best_compression, and ZSTD compression codecs. This PR changes ZSTD to zstd to maintain consistency in naming compression codecs.

Issues Resolved

A follow up to PR: #7171.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

* lowercase letters when registering the codec so that we remain consistent with
* the other compression codecs: default, lucene_default, and best_compression.
*
* @param mode The compression codec (ZSTD or ZSTDNODICT).
Copy link
Member

Choose a reason for hiding this comment

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

Should be lowercase in the @param.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The parameter is a Java enum.

public Lucene95CustomCodec(Mode mode, int compressionLevel) {
super(mode.name(), new Lucene95Codec());
super(mode.name().toLowerCase(Locale.ROOT), new Lucene95Codec());
Copy link
Member

@dblock dblock Apr 19, 2023

Choose a reason for hiding this comment

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

Why do we still want toLowerCase it here? If we want these to be case-sensitive we should get rid of anything that says ZSTD and replace it with zstd, no?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is to simplify a bit Mode conventions: since this is Java's enum, the convention is to use uppercased Java members (mode.name())

@dblock dblock merged commit e791d46 into opensearch-project:main Apr 20, 2023
@dblock dblock added the backport 2.x Backport to 2.x branch label Apr 20, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 20, 2023
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
(cherry picked from commit e791d46)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Apr 20, 2023
#7260)

(cherry picked from commit e791d46)

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>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Apr 28, 2023
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…earch-project#7231)

Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants