Synchronize log entry removal and compaction.