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

Shut down JournalFlusher before closing CollectionCatalog

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Storage Execution 2025-04-28
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In shutdownGlobalStorageEngineCleanly() we call StorageControl::stopStorageControls() followed by storageEngine->cleanShutdown(). Journal flusher is shut down in stopStorageControls().  It used to be that the collection catalog isn't closed until in StorageEngineImpl::cleanShutdown(), but SERVER-98989 moved ColllectionCatalog shutdown to shutDownCollectionCatalogAndGlobalStorageEngineCleanly() which now closes the collection catalog first. Since the JournalFlusher isn't yet shut down, it may call the journalListener's onDurable callback which is used by replication which assumes the oplog record store is still valid.

            Assignee:
            wei.hu@mongodb.com Wei Hu
            Reporter:
            wei.hu@mongodb.com Wei Hu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: