jihuayu commented on PR #3567: URL: https://github.com/apache/kvrocks/pull/3567#issuecomment-5313223777
Regarding the background task, I think your overall design looks reasonable. I have a few thoughts: 1. I don't think the compaction operation is very urgent. We could add a debounce mechanism, for example, delaying it by 5 minutes, to avoid triggering multiple compactions after several modifications within a short period. 2. I think we should investigate how long the lock will be held during compaction. A short lock is acceptable, but if compaction may hold the lock for a long time, we should consider whether to add some additional fields to the data structure to support the GC process. 3. Regarding the issue of the task being lost after a restart, could we provide an explicit command that allows users to manually trigger the compaction? PS: We can open a separate discussion or issue to discuss this further. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
