pub fn should_compact( commit_version: Version, compaction_interval: Version, ) -> bool
Determine if log compaction should be performed based on the commit version and compaction interval.