I noticed the high default value of the rocksdb option keep_log_file_num which is set to 1000. Standard rocksdb default would be 10. Is there a reason for this? I know i can wipe them manually or per script, but i rather ask if its perhaps a bad idea since the default is so different from standard rocksdb setup.
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
The keep_log_file_num option is actually commented out in the current source code (//db_opts.set_keep_log_file_num(100);), meaning Stalwart is not setting this value at all – it falls through to the RocksDB library’s own default. Stalwart is not overriding it to 1000 or any other value.
If you are seeing 1000 as the value in your environment, that is the default baked into the version of the rocksdb Rust crate that Stalwart links against, not a Stalwart-specific choice. It is not something Stalwart has deliberately set higher than stock. If you want to reduce it, you would need to configure it at the RocksDB level outside of Stalwart, or raise the topic with the project maintainers – but from the source, Stalwart itself is simply leaving it at whatever the library default is.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.