Skip to content

Commit

Permalink
fix wrong spell
Browse files Browse the repository at this point in the history
Signed-off-by: disksing <[email protected]>
  • Loading branch information
disksing committed May 13, 2021
1 parent 3baf909 commit a22f2c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion store/driver/txn/txn_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (txn *tikvTxn) SetOption(opt int, val interface{}) {
case tikvstore.Enable1PC:
txn.SetEnable1PC(val.(bool))
case tikvstore.GuaranteeLinearizability:
txn.SetCasualConsistency(!val.(bool))
txn.SetCausalConsistency(!val.(bool))
case tikvstore.TxnScope:
txn.SetScope(val.(string))
case tikvstore.IsStalenessReadOnly:
Expand Down
2 changes: 1 addition & 1 deletion store/tikv/tests/async_commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (s *testAsyncCommitCommon) mustGetNoneFromSnapshot(c *C, version uint64, ke

func (s *testAsyncCommitCommon) beginAsyncCommitWithLinearizability(c *C) tikv.TxnProbe {
txn := s.beginAsyncCommit(c)
txn.SetCasualConsistency(false)
txn.SetCausalConsistency(false)
return txn
}

Expand Down
2 changes: 1 addition & 1 deletion store/tikv/tests/snapshot_fail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (s *testSnapshotFailSuite) TestRetryPointGetResolveTS(c *C) {
c.Assert(err, IsNil)
txn.SetEnableAsyncCommit(false)
txn.SetEnable1PC(false)
txn.SetCasualConsistency(true)
txn.SetCausalConsistency(true)

// Prewrite the lock without committing it
c.Assert(failpoint.Enable("github.com/pingcap/tidb/store/tikv/beforeCommit", `pause`), IsNil)
Expand Down
4 changes: 2 additions & 2 deletions store/tikv/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ func (txn *KVTxn) SetEnable1PC(b bool) {
txn.enable1PC = b
}

// SetCasualConsistency indicates if the transaction does not need to
// SetCausalConsistency indicates if the transaction does not need to
// guarantee linearizability. Default value is false which means
// linearizability is guaranteed.
func (txn *KVTxn) SetCasualConsistency(b bool) {
func (txn *KVTxn) SetCausalConsistency(b bool) {
txn.causalConsistency = b
}

Expand Down

0 comments on commit a22f2c6

Please sign in to comment.