Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed May 25, 2021
1 parent ec19c3d commit 34a0edd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions executor/point_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ func (e *PointGetExecutor) get(ctx context.Context, key kv.Key) ([]byte, error)
// fallthrough to snapshot get.
}

// Global temporary table is always empty, so no need to send the request.
if e.tblInfo.TempTableType == model.TempTableGlobal {
return nil, nil
}
lock := e.tblInfo.Lock
if lock != nil && (lock.Tp == model.TableLockRead || lock.Tp == model.TableLockReadOnly) {
if e.ctx.GetSessionVars().EnablePointGetCache {
Expand All @@ -380,10 +384,6 @@ func (e *PointGetExecutor) get(ctx context.Context, key kv.Key) ([]byte, error)
return val, nil
}
}
// Global temporary table is always empty, so no need to send the request.
if e.tblInfo.TempTableType == model.TempTableGlobal {
return nil, nil
}
// if not read lock or table was unlock then snapshot get
return e.snapshot.Get(ctx, key)
}
Expand Down

0 comments on commit 34a0edd

Please sign in to comment.