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

[BUG] OpenSearch-Benchmark silently falls back and uses default for invalid index.codec values. #268

Closed
mulugetam opened this issue Apr 17, 2023 · 5 comments
Assignees
Labels
bug Something isn't working High Priority

Comments

@mulugetam
Copy link

Describe the bug
OpenSearch-Benchmark silently falls back and uses default (LZ4) for an invalid index.codec value.

To Reproduce*
The below creates a geonames index and uses LZ4 instead of throwing an error.

opensearch-benchmark execute_test \
--workload=geonames \
--workload-params='{"index_settings":{"index.codec": "this_should_be_invalid"}}' \
--target-hosts=127.0.0.1:9200 \
--kill-running-processes \
--pipeline=benchmark-only \
--include-tasks=delete-index,create-index,index-append \
--kill-running-processes

Expected behavior
An error must be reported. E.g. invalid index.codec value 'this_should_be_invalid'.

@IanHoang
Copy link
Collaborator

Will take a look

@IanHoang IanHoang self-assigned this May 15, 2023
@IanHoang
Copy link
Collaborator

IanHoang commented May 15, 2023

Made some changes and tested it locally. Made a PR

$ opensearch-benchmark execute-test \
--pipeline=benchmark-only \
 --workload=geonames \
--target-host="<TARGET_ENDPOINT>" \
--client-options="basic_auth_user:'<USERNAME>',basic_auth_password:'<PASSWORD>'" \
 --include-tasks=delete-index,create-index,index-append \
--workload-params='{"index_settings":{"index.codec": "this_should_be_invalid"}}' \

   ____                  _____                      __       ____                  __                         __
  / __ \____  ___  ____ / ___/___  ____ ___________/ /_     / __ )___  ____  _____/ /_  ____ ___  ____ ______/ /__
 / / / / __ \/ _ \/ __ \\__ \/ _ \/ __ `/ ___/ ___/ __ \   / __  / _ \/ __ \/ ___/ __ \/ __ `__ \/ __ `/ ___/ //_/
/ /_/ / /_/ /  __/ / / /__/ /  __/ /_/ / /  / /__/ / / /  / /_/ /  __/ / / / /__/ / / / / / / / / /_/ / /  / ,<
\____/ .___/\___/_/ /_/____/\___/\__,_/_/   \___/_/ /_/  /_____/\___/_/ /_/\___/_/ /_/_/ /_/ /_/\__,_/_/  /_/|_|
    /_/

[INFO] You did not provide an explicit timeout in the client options. Assuming default of 10 seconds.

[ERROR] Cannot execute-test. Error in workload preparator (Invalid index.codec value 'this_should_be_invalid')

Getting further help:
*********************
* Check the log files in /Users/hoangia/.benchmark/logs for errors.
* Read the documentation at https://opensearch.org/docs.
* Ask a question on the forum at https://forum.opensearch.org/.
* Raise an issue at https://github.com/opensearch-project/OpenSearch-Benchmark/issues and include the log files in /Users/hoangia/.benchmark/logs.

-------------------------------
[INFO] FAILURE (took 8 seconds)
-------------------------------

@IanHoang
Copy link
Collaborator

Resolved in #296

@mulugetam
Copy link
Author

mulugetam commented May 23, 2023

@IanHoang OpenSearch since version 2.7.0 supports ZSTD and ZSTDNODICT compression codecs using Lucene's NamedSPILoader and this fix doesn't seem to address that. Could you please add ZSTD and ZSTDNODICT as additional valid values for index.codec?

Also, can you make the comparison case-insensitive? (The upcoming OpenSearch release would use zstd and zstdnodict instead of ZSTD and ZSTDNODICT)?

@IanHoang
Copy link
Collaborator

@mulugetam Thanks for bringing this to our attention. It'd be better to create a new issue though since this one was primarily for raising exceptions whenever an invalid codec was provided.

Could you create a separate issue for OSB supporting ZSTD and ZSTDNODICT Compression Codecs ? Once that issue is created, we can add support for ZSTD and ZSTDNODICT compression codecs as well as make the comparison case-insensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Priority
Projects
Development

No branches or pull requests

2 participants