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

collection metadata for multikey not removed after WriteConflictException from durable catalog update

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc5, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Execution Team 2021-06-28
    • 127

      The collection metadata in CollectionImpl tracks both the uncommitted changes in memory and the persisted state in DurableCatalog. The IndexCatalogEntry updates the collection metadata for multikey by calling CollectionImpl::setIndexIsMultikey(). All updates on the collection metadata has to be done in a storage transaction (WriteUnitOfWork) with cleanup handlers to clear the uncommitted state if the transaction is aborted. If a WriteConflictException is thrown from DurableCatalog::putMetaData() before the rollback handler to remove the uncommitted multikey state is installed, we may end up with a collection metadata state where subsequent writers may observe uncommitted multikey information that should have been discarded.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: