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

dassert in IndexCatalogImpl::numIndexesTotal() can throw a WriteConflictException in debug builds

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Index Maintenance, Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2019-07-29
    • 17

      The dassert tries to read a record out of the catalog using KVCollectionCatalogEntry::getMetadata() which uses WiredTigerRecordStore::findRecord() and that could return a WriteConflictException when the WTSkipPrepareConflictRetries and skipWriteConflictRetries failpoints are enabled, preventing the WiredTigerRecordStore::findRecord() from retrying. Eventually this bubbles up to the caller as a WriteConflict. The dassert is a sanity check in debug builds to ensure that the in-memory index catalog matches the one on-disk.

      Running a command that doesn't expect a WriteConflictException such as the collStats command can return a WriteConflict error back to the user in this case.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: