Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
sql: assigned timestamp at SQL should correspond to some KV timestamp #4393
This makes it somewhat hard to reason about timestamps in SQL transactions and, as a result, about observed consistency-related phenomena.
It seems adequate to chose the original timestamp of the transaction instead of
Implementation would be straightforward: Upon creation of a transaction, set its timestamp. Possibly a minor fix to TxnCoordSender is necessary so that it respects a preset timestamp in a new transaction proto.
btw there's a comment in the Session proto that says these two timestamps are different. It will have to be changed.
changed the title from
Assigned timestamp at SQL should correspond to some KV timestamp
sql: assigned timestamp at SQL should correspond to some KV timestamp
Feb 25, 2016
I think the only reason we didn't use
referenced this issue
Feb 27, 2016
As discussed with @andreimatei: We should also update this timestamp on retries. Instead of using the one returned from the retry error, we want a current one from the node clock at the time of the client's restart (so not assigned when handling the error but with the subsequent next RPC from the client).