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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.1, 4.3.1
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Sharding 2019-08-12
    • 11

      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.

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

              Created:
              Updated:
              Resolved: