Skip to content

Commit

Permalink
txn:set min commit ts for prewrite build for async commit protocol (p…
Browse files Browse the repository at this point in the history
…ingcap#18759)

Co-authored-by: ti-srebot <[email protected]>
  • Loading branch information
cfzjywxk and ti-srebot authored Jul 24, 2020
1 parent baf6c99 commit a4c9f81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions store/tikv/prewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func (c *twoPhaseCommitter) buildPrewriteRequest(batch batchMutations, txnSize u
req.Secondaries = c.asyncSecondaries()
}
req.UseAsyncCommit = true
// The async commit can not be used for large transactions, and the commit ts can't be pushed.
req.MinCommitTs = 0
}

return tikvrpc.NewRequest(tikvrpc.CmdPrewrite, req, pb.Context{Priority: c.priority, SyncLog: c.syncLog})
Expand Down

0 comments on commit a4c9f81

Please sign in to comment.