SBE UnionStage shouldn't pass reOpen to closed child stages

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The fix is simple.

      diff --git a/src/mongo/db/exec/sbe/stages/union.cpp b/src/mongo/db/exec/sbe/stages/union.cpp
      index a661e6c579f..c3cb11cbbe2 100644
      --- a/src/mongo/db/exec/sbe/stages/union.cpp
      +++ b/src/mongo/db/exec/sbe/stages/union.cpp
      @@ -110,7 +110,7 @@ void UnionStage::open(bool reOpen) {
           }
      
           for (auto& child : _children) {
      -        _remainingBranchesToDrain.push({child.get(), reOpen});
      +        _remainingBranchesToDrain.push({child.get(), false});
           }
      
           _remainingBranchesToDrain.front().open();

              Assignee:
              [DO NOT USE] Backlog - Query Execution
              Reporter:
              Eric Cox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: