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

Fix canceling transaction API when using an InlineExecutor

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc1
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • v7.0
    • Sharding NYC 2023-05-15, Sharding NYC 2023-05-29
    • 20

    Description

      When the transaction API was made to use an InlineExecutor, this inadvertently broke how cancelation works for it. Previously, the transaction ran on a separate thread from the caller's, so the caller would stop waiting on interrupt, cancel the transaction, then return the error code it was interrupted with. Now the transaction runs on the caller's thread, so it won't stop waiting on interruption, and the API doesn't think to check for the caller's opCtx being interrupted, so it will ignore the interruption. Instead, the API should respect the caller being interrupted even when using a single thread via the InlineExecutor.

      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: