Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
Fully Compatible
-
v5.0
-
Sharding 2021-06-28
-
1
Description
We should add a guard around to call Pipeline::dispose() if this call to Pipeline::getNext() throws.
auto guard = makeGuard([&] { pipeline->dispose(opCtx); pipeline.reset() });
|
pipeline->reattachToOperationContext(opCtx);
|
auto doc = pipeline->getNext();
|
pipeline->detachFromOperationContext();
|
guard.dismiss();
|
Attachments
Issue Links
- is related to
-
SERVER-56437 ReshardingDonorOplogIterator destroys OperationContext with Pipeline still attached on exception
-
- Closed
-
-
SERVER-57653 ReshardingDonorOplogIterator must call Pipeline::dispose() if Pipeline::getNext() throws
-
- Closed
-