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

Call Pipeline::dispose() if Pipeline::getNext() throws in ReshardingTxnCloner

    XMLWordPrintable

Details

    • 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

          Activity

            People

              luis.osta@mongodb.com Luis Osta (Inactive)
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: