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

Move TransactionWithRetries::runSync executor futures into details::Transaction

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Sharding 2022-03-07
    • 133

    Description

      Currently, the transaction API's TransactionWithRetries::runSync method will create ExecutorFutures to call methods on its private member _internalTxn, which actually runs the transaction's commands. These futures don't guarantee the TransactionWithRetries will be in scope when they run though, potentially leading to errors. Instead, TransactionWithRetries shouldn't use an executor at all and leave that to the Transaction class, which is already a shared pointer and can extend its lifetime with shared_from_this().

      Attachments

        Activity

          People

            jack.mulrow@mongodb.com Jack Mulrow
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: