Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-89727

Remove acquisition of database and collection locks in compaction

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc9, 7.0.13
    • Affects Version/s: None
    • Component/s: None
    • None
    • RSS Sydney
    • Fully Compatible
    • v8.0, v7.0, v6.0, v5.0
    • Execution Team 2024-04-29, RSS Sydney - 2024-05-13, RSS Sydney - 2024-05-28, RSS Sydney - 2024-06-11

      To do this, we need to remove supportsOnlineCompaction(). WiredTiger supports online compaction, so the case where this isn't supported is not tested.

      Once we remove this, we no longer need database and collections locks during compaction and we can get the collection from the CollectionCatalog. All that's necessary is the global MODE_IS lock to prevent the storage engine from shutting down while compaction is running. The global MODE_IS lock should skip acquiring the RSTL and flow control ticket.

      This will also allow other DDL operations needing stronger locks to run during compaction, which could also block oplog application today.

            Assignee:
            clarisse.cheah@mongodb.com Clarisse Cheah
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: