Skip to content

Commit

Permalink
don't set options in vdiff resume
Browse files Browse the repository at this point in the history
Signed-off-by: Shanth Sathiyaseelan <[email protected]>
  • Loading branch information
shanth96 committed Nov 16, 2023
1 parent f757ff2 commit b2a828a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletmanager/vdiff/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (vde *Engine) handleCreateResumeAction(ctx context.Context, dbClient binlog
}
resp.Id = int64(qr.InsertID)
} else {
query := fmt.Sprintf(sqlResumeVDiff, encodeString(string(optionsJSON)), encodeString(req.VdiffUuid))
query := fmt.Sprintf(sqlResumeVDiff, encodeString(req.VdiffUuid))
if qr, err = dbClient.ExecuteFetch(query, 1); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletmanager/vdiff/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const (
primary key (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`

sqlNewVDiff = "insert into _vt.vdiff(keyspace, workflow, state, options, shard, db_name, vdiff_uuid) values(%s, %s, '%s', %s, '%s', '%s', '%s')"
sqlResumeVDiff = `update _vt.vdiff as vd, _vt.vdiff_table as vdt set vd.options = %s, vd.started_at = NULL, vd.completed_at = NULL, vd.state = 'pending',
sqlResumeVDiff = `update _vt.vdiff as vd, _vt.vdiff_table as vdt set vd.started_at = NULL, vd.completed_at = NULL, vd.state = 'pending',
vdt.state = 'pending' where vd.vdiff_uuid = %s and vd.id = vdt.vdiff_id and vd.state in ('completed', 'stopped')
and vdt.state in ('completed', 'stopped')`
sqlRetryVDiff = `update _vt.vdiff as vd left join _vt.vdiff_table as vdt on (vd.id = vdt.vdiff_id) set vd.state = 'pending',
Expand Down

0 comments on commit b2a828a

Please sign in to comment.