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

The `txn::sendPrepare` utility can return without having destroyed its child AsyncWorkScheduler

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.11
    • None
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2019-04-22
    • 12

    Description

      The Transaction Coordinator's txn::sendPrepare utility instantiates its own child AsyncWorkScheduler in order to be able to cancel just its part of the work without impacting the parent.

      The lifetime of this child scheduler has to be shorter than the signaling of the future returned by txn::sendPrepare, so that the caller can use the signaling of the future for controlling the lifetime of its own objects (in this case the entire TransactionCoordinator).

      The way it is currently implemented, because prepareScheduler is moved into txn::collect's collector lambda, it will still be alive at the time when the returned future's chain is signaled.

      Attachments

        Activity

          People

            kaloian.manassiev@mongodb.com Kaloian Manassiev
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: