We first take the collection exclusive lock and downgrade it to an intent lock if the storage engine supports online compaction. We should reverse the order of this as it reports confusing FTDC metrics. Start with the intent lock and upgrade to an exclusive lock if online compaction is not supported.
I also don't think the compact command should take the PBWM lock as the command is internal to the storage engine and should not block oplog application.
- is duplicated by
-
SERVER-63973 Investigate compact not holding the PBWM lock
- Closed
- is related to
-
SERVER-16413 Storage engines that allow online compaction should not take an exclusive lock
- Closed