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

Can't find a way to trigger RocksDB cleanup more often #392

Open
AntonyLittle opened this issue Dec 4, 2024 · 1 comment
Open

Can't find a way to trigger RocksDB cleanup more often #392

AntonyLittle opened this issue Dec 4, 2024 · 1 comment

Comments

@AntonyLittle
Copy link

Description

I have noticed that, when RocksDB is initialised, it does a cleanup/compaction on existing data. I cannot, however, figure out how to make this happen while to service is running. Any ideas?

This document (https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide) mentions options.tll and options.periodic_compaction_seconds, both of which would be of use to us, but I cannot see how to access these settings through Streamiz.

@LGouellec
Copy link
Owner

Hey @AntonyLittle ,

TTL is not available with RocksDb through Streamiz for multiple reasons. The main one is RocksDb is not the source of through in Kafka Streams, the internal changelog topic does. So you can't remove deprecated data in RocksDb if the internal topic still contains the data.

Regarding options.periodic_compaction_seconds, this setting is not accessible easily , but you can override the parameter with a such custom rocksdb handler :

RocksDbConfigHandler = (store, options) =>
                {
                    var field = options.GetType().GetField("dbOptions", BindingFlags.NonPublic | BindingFlags.Instance);
                    Native.Instance.rocksdb_options_set_periodic_compaction_seconds(
                        (field.GetValue(options) as DbOptions).Handle, 10000);
                }

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

No branches or pull requests

2 participants