Optimize the lock between the major compaction and sweeper tool.