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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.1
    • 4.3.1
    • Querying, Storage
    • None
    • Fully Compatible
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: