Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <[email protected]>
  • Loading branch information
you06 committed Jul 13, 2022
1 parent f54ef82 commit c2d301b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions executor/point_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func (e *PointGetExecutor) Next(ctx context.Context, req *chunk.Chunk) error {
return err
}

// lockNonExistIdxKey indicates the key will be locked regardless of its existence.
lockNonExistIdxKey := !e.ctx.GetSessionVars().IsPessimisticReadConsistency()
// Non-exist keys are also locked if the isolation level is not read consistency,
// lock it before read here, then it's able to read from pessimistic lock cache.
Expand Down

0 comments on commit c2d301b

Please sign in to comment.