Skip to content

Commit

Permalink
refactor set option to detect race risk
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <you1474600@gmail.com>

commit intest package

Signed-off-by: you06 <you1474600@gmail.com>

update

Signed-off-by: you06 <you1474600@gmail.com>
  • Loading branch information
you06 committed Mar 19, 2024
1 parent 44b2944 commit ce69786
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 80 deletions.
18 changes: 8 additions & 10 deletions txnkv/transaction/2pc.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,14 @@ func (c *PlainMutations) AppendMutation(mutation PlainMutation) {
// newTwoPhaseCommitter creates a twoPhaseCommitter.
func newTwoPhaseCommitter(txn *KVTxn, sessionID uint64) (*twoPhaseCommitter, error) {
committer := &twoPhaseCommitter{
store: txn.store,
txn: txn,
startTS: txn.StartTS(),
sessionID: sessionID,
regionTxnSize: map[uint64]int{},
isPessimistic: txn.IsPessimistic(),
binlog: txn.binlog,
diskFullOpt: kvrpcpb.DiskFullOpt_NotAllowedOnFull,
resourceGroupName: txn.resourceGroupName,
}
store: txn.store,
txn: txn,
startTS: txn.StartTS(),
sessionID: sessionID,
regionTxnSize: map[uint64]int{},
isPessimistic: txn.IsPessimistic(),
}
txn.commitActionContext.applyToCommitter(committer)
return committer, nil
}

Expand Down

0 comments on commit ce69786

Please sign in to comment.