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.
- has to be done before
-
SERVER-40983 Track and log relevant single transaction metrics on mongos for currentOp
- Closed