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

buildStages() STAGE_SHARDING_FILTER block should hold child stage tree by unique_ptr

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.2.0, 4.3.1
    • 4.3.1, 4.2.10
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • 72

    Description

      When building a ShardFilterStage we will do the following:

      1) Build the child stage tree, and hold by raw pointer

      2) Get a CollectionShardingState object and use it to retrieve an orphans filter via call to CollectionShardingState::getOrphansFilter().

      3) Create and return the ShardFilterStage

      The call to CollectionShardingState::get() can dassert and the call to CollectionShardingState::getOrphansFilter() can uassert. In either case we will leak the child stage tree.

      We should change this block to hold the child stage tree by unique_ptr and not release until after acquiring the orphans filter.

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: