Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: use Clock.PhysicalTime in beginTransactionTimestampsAndReadMode
Synchronizing with the HLC clock doesn't look to be necessary. I'm confused about this though. The comment on beginTransactionTimestampsAndReadMode says that "txnSQLTimestamp propagates to become the TxnTimestamp". Is this trying to say that the timestamp makes it way into the kv.Txn? Because that's not true. Regardless, the one reason not to make this change is that PhysicalTime is not guaranteed to be monotonic on some systems and can generally diverge from the HLC's clock. If we're worried about that though, we should use the HLC here and feed that directly into the kv.Txn. We shouldn't need to grab two timestamps from the HLC per txn.
- Loading branch information