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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.2.0, 4.3.1
    • Fix Version/s: 4.3.1
    • Component/s: None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Linked BF Score:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: