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

Check if the index was dropped after locking the weak_ptr to the IndexCatalogEntry in RequiresIndexStage and RequiresAllIndicesStage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.3.1
    • Fix Version/s: 4.3.1
    • Component/s: Querying, Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Execution Team 2019-10-21

      Description

      While working on the background validation project, it came to my attention that requires_index_stage.h holds a weak_ptr to a shared_ptr of IndexCatalogEntry. This is used to detect when the underlying index entry has been destroyed.

      However, background collection validation holds a shared_ptr to the IndexCatalogEntries it’s validating even when they’ve been removed from the IndexCatalog while periodically yielding locks during validation.

      This seems unsafe for requires_index_stage.h to rely on a weak_ptr now. I was thinking if we should change the weak_ptr to a shared_ptr and check the isDropped() flag on the IndexCatalogEntry that was added as part of the background validation project here

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: