[SERVER-63540] SBE UnionStage shouldn't pass reOpen to closed child stages Created: 10/Feb/22  Updated: 06/Dec/22  Resolved: 29/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Eric Cox (Inactive) Assignee: Backlog - Query Execution
Resolution: Won't Fix Votes: 0
Labels: sbe
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Operating System: ALL
Participants:

 Description   

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();



 Comments   
Comment by Ethan Zhang (Inactive) [ 29/Mar/22 ]

Closing this because we decided to build a HashLookupStage instead.

Generated at Thu Feb 08 05:58:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.