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

db_bench should fail rather than accepting an unsupported compression type #9621

Closed
mdcallag opened this issue Feb 22, 2022 · 2 comments
Closed
Assignees

Comments

@mdcallag
Copy link
Contributor

db_bench has several options that accept a compression type as a string and a function converts that string to a compression type enum. For invalid strings the function logs an error message and then returns kSnappyCompression.

I want it to fail (exit with an error code) in that case because nobody is writing scripts to look for that error message, including all of the usage in our perf QA testing. The current code will allow a test to run using the wrong compression and much time can be wasted trying to figure that out.

@mdcallag mdcallag self-assigned this Mar 2, 2022
@mdcallag mdcallag removed the up-for-grabs Up for grabs label Mar 2, 2022
@mdcallag
Copy link
Contributor Author

mdcallag commented Mar 2, 2022

StringToDistributionType has the same problem, ignores bad type names.

facebook-github-bot pushed a commit that referenced this issue Mar 23, 2022
…9729)

Summary:
This changes db_bench to fail at startup for invalid compression types. It had been
changing them to Snappy. For other invalid options it fails at startup.

This is for #9621

Pull Request resolved: #9729

Test Plan:
This continues to work:
./db_bench --benchmarks=fillrandom --compression_type=lz4

This now fails rather than changing the compression type to Snappy
./db_bench --benchmarks=fillrandom --compression_type=lz44
Cannot parse compression type 'lz44'

Reviewed By: jay-zhuang

Differential Revision: D35081323

Pulled By: mdcallag

fbshipit-source-id: 9b38c835abddce11aa7feb235df63f53cf829981
@mdcallag
Copy link
Contributor Author

Fixed by #9729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant