Skip to content

Commit

Permalink
TabletServer: execute DDLs without timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
shlomi-noach committed Sep 4, 2024
1 parent 1ed18d0 commit 1004173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,10 @@ func (tsv *TabletServer) execute(ctx context.Context, target *querypb.Target, sq
if err != nil {
return err
}
if plan.PlanID == planbuilder.PlanDDL {
// DDLs (especially ALTER TABLE, OPTIMIZE TABLE) can run for a very long time, so we don't want to enforce a specific timeout.
ctx = context.WithoutCancel(ctx)
}
qre := &QueryExecutor{
query: query,
marginComments: comments,
Expand Down

0 comments on commit 1004173

Please sign in to comment.