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

Dynamic modification of the parameter rocksdb.compression to zstd in version 2.4 may not take effect immediately on newly created files #1560

Closed
1 of 2 tasks
bbqccx opened this issue Jul 7, 2023 · 1 comment · Fixed by #1576
Assignees
Labels
bug type bug good first issue Good for newcomers help wanted Good for newcomers

Comments

@bbqccx
Copy link

bbqccx commented Jul 7, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.4

Minimal reproduce step

1.Modify the compression parameters.
2.FlushDB and compact
3.Rewrite the data, but it appears that zstd compression was not applied based on the logs. The output still shows that the compression used is lz4.
"[CompactOnExpiredCollector]", "compression": "LZ4", "compression_options": "window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; max_dict_buffer_bytes=0; use_zstd_dict_trainer=1; "

if reboot kvrocks then use zstd

2023/07/05-13:22:43.170822 1 Options.write_buffer_size: 67108864
2023/07/05-13:22:43.170824 1 Options.max_write_buffer_number: 10
2023/07/05-13:22:43.170826 1 Options.compression[0]: NoCompression
2023/07/05-13:22:43.170827 1 Options.compression[1]: NoCompression
2023/07/05-13:22:43.170829 1 Options.compression[2]: ZSTD
2023/07/05-13:22:43.170830 1 Options.compression[3]: ZSTD
2023/07/05-13:22:43.170832 1 Options.compression[4]: ZSTD
2023/07/05-13:22:43.170833 1 Options.compression[5]: ZSTD
2023/07/05-13:22:43.170835 1 Options.compression[6]: ZSTD

"[CompactOnExpiredCollector]", "compression": "ZSTD", "compression_options": "window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; max_dict_buffer_bytes=0; use_zstd_dict_trainer=1; "

What did you expect to see?

Test passed

What did you see instead?

The compression parameters only take effect after a restart

Anything Else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@bbqccx bbqccx added the bug type bug label Jul 7, 2023
@git-hulk
Copy link
Member

git-hulk commented Jul 7, 2023

@bbqccx Thanks for your feedback. It's caused by the compression haven't been applied to the rocksdb after the config set command. We should add the callback to apply this option after it's changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug good first issue Good for newcomers help wanted Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants