From c2d301b388affcc59064b920f11f8779dae36c8f Mon Sep 17 00:00:00 2001 From: you06 Date: Wed, 13 Jul 2022 14:05:43 +0800 Subject: [PATCH] add comment Signed-off-by: you06 --- executor/point_get.go | 1 + 1 file changed, 1 insertion(+) diff --git a/executor/point_get.go b/executor/point_get.go index 8baa02111241c..e744570cbf370 100644 --- a/executor/point_get.go +++ b/executor/point_get.go @@ -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.