-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
txn: store last commit transaction's info #1537
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: you06 <[email protected]> fix test Signed-off-by: you06 <[email protected]> update tidb Signed-off-by: you06 <[email protected]> check commit ts in oracle Signed-off-by: you06 <[email protected]> update Signed-off-by: you06 <[email protected]>
e122acd
to
7c20c70
Compare
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
txnScope string | ||
o *pdOracle | ||
txnScope string | ||
commitInfo *util.CommitInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps lastCommitInfo
is better.
@@ -1903,6 +1905,7 @@ func (c *twoPhaseCommitter) execute(ctx context.Context) (err error) { | |||
} | |||
} | |||
atomic.StoreUint64(&c.commitTS, commitTS) | |||
c.updateStoreCommitInfo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The transaction is not ensured to be committed successfully here, for example, if 2PC is used.
Ref: pingcap/tidb#57165
Implement this comment: #1489 (review)