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

Check if cluster time has been set on TransactionRouter before observing from an external thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.1, 4.3.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Sprint:
      Sharding 2019-08-12
    • Linked BF Score:
      11

      Description

      Background

      If we try to check the logical time in the TransactionRouter before the time is set, it will hit an invariant that the logical time isn't set (obviously).

      This wasn't previously an issue until a method was introduced that can check the cluster time from an external thread. This happens due to the new method that attempts to abort all transactions on a mongos. This will hit the invariant that the logical time is set, because we try to log the cluster time when we abort (and we're on log level 1 or higher).

      Proposed Fix

      Create an clusterTimeHasBeenSet function on the TransactionRouter, that we can check explicitly for the path that tries to log the transaction.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              blake.oler Blake Oler
              Reporter:
              blake.oler Blake Oler
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: