Skip to content

Commit

Permalink
move cancel func to other variable declaration
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Sep 10, 2024
1 parent 71aa779 commit 118e246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/vtgate/plan_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ func (e *Executor) newExecute(
lastVSchemaCreated = vs.GetCreated()
result *sqltypes.Result
plan *engine.Plan
cancel context.CancelFunc
)

var cancel context.CancelFunc
for try := 0; try < MaxBufferingRetries; try++ {
if try > 0 && !vs.GetCreated().After(lastVSchemaCreated) { // We need to wait for a vschema update
// Without a wait we fail non-deterministically since the previous vschema will not have
Expand Down

0 comments on commit 118e246

Please sign in to comment.