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

Extend access_collection_in_transaction_after_catalog_changes.js to accept ExceededTimeLimit as possible errors for a transaction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc9
    • Affects Version/s: 8.0.0-rc0, 8.1.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2024-06-24
    • 0
    • 1

      Context

      SERVER-84623 changed the entry point to return to the router the actual error that caused the transaction to fail. Before SERVER-84623, every transient error would’ve been masked as StaleConfig and propagated back to the router. That was wrong and you can find more information in SERVER-84623.

      Problem

      Specifically for  access_collection_in_transaction_after_catalog_changes.js, the findAndModify, which runs within a transaction, is experiencing several “Exceeded time limit” waiting on the critical section being taken by another operation.  Specifically, the command will attempt to refresh on the server, which blocks the transaction for the reason explained. If the critical section does not resolve within the limit time (500ms) we throw an ExceedTimeLimit which is now correctly propagated back to the router.

      The test always presented this behavior. The difference is that before SERVER-84623., that would’ve resulted in a StaleConfig error which is present among the expected errors.

      Proposed solution

      “Exceeded time limit” should be added among the expected errors.

            Assignee:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: