Open 13015517713 opened 3 months ago
@13015517713 Thanks for bringing up this discussion. It's unnecessary to check if disabled since the compaction will be totally depended on the rocksdb.
The range isn't read-only, and the thread is not so high-cost. I think it's ok to not dynamically enable it. But if we can have a timer task system, it would also be ok to execute the check in the timer rather than a separate thread
Yes, it's good to leave as it is to keep the codes simple.
Search before asking
Motivation
When running Server.start(), kvrocks will launch a thread for compaction check. Some considerations are as follows.
If there is no checker configured, maybe it is no need to start the thread to check frequently. Only if it is enabled, then create the thread.
The checker for pubsubfiles is independent of the configuration of the normal checker (the code is like this). If there is no configured checker, kvrocks also should do compression for pubsub. (not sure I understand that correctly.)
Corresponding code block is in server.cc, Server().Start().
Solution
No response
Are you willing to submit a PR?