Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
Signed-off-by: ekexium <[email protected]>
  • Loading branch information
ekexium committed Feb 3, 2021
1 parent 044d27a commit de28dd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ func (s *session) doCommit(ctx context.Context) error {
}
s.txn.SetOption(kv.EnableAsyncCommit, s.GetSessionVars().EnableAsyncCommit)
s.txn.SetOption(kv.Enable1PC, s.GetSessionVars().Enable1PC)
// priority of the sysvar is lower than `start transaction with causal consistency`
// priority of the sysvar is lower than `start transaction with causal consistency only`
if s.txn.GetUnionStore().GetOption(kv.GuaranteeLinearizability) == nil {
s.txn.SetOption(kv.GuaranteeLinearizability, s.GetSessionVars().GuaranteeLinearizability)
}
Expand Down
1 change: 1 addition & 0 deletions sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ type SessionVars struct {
// Enable1PC indicates whether to enable the one-phase commit feature.
Enable1PC bool

// GuaranteeLinearizability indicates whether to guarantee linearizability
GuaranteeLinearizability bool

// AnalyzeVersion indicates how TiDB collect and use analyzed statistics.
Expand Down

0 comments on commit de28dd7

Please sign in to comment.