Skip to content

Commit

Permalink
Make CloneVT() changes in vcopier_atomic.go to align with changes in v…
Browse files Browse the repository at this point in the history
…itessio#13914

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
  • Loading branch information
rohit-nayak-ps committed Sep 6, 2023
1 parent 3424653 commit 2647b71
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions go/vt/vttablet/tabletmanager/vreplication/vcopier_atomic.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,16 @@ func (vc *vcopier) copyAll(ctx context.Context, settings binlogplayer.VRSettings
lastpk = nil
// pkfields are only used for logging, so that we can monitor progress.
pkfields = make([]*querypb.Field, len(resp.Pkfields))
copy(pkfields, resp.Pkfields)
for _, f := range resp.Pkfields {
pkfields = append(pkfields, f.CloneVT())
}

fieldEvent := &binlogdatapb.FieldEvent{
TableName: tableName,
}
fieldEvent.Fields = append(fieldEvent.Fields, resp.Fields...)
for _, f := range resp.Fields {
fieldEvent.Fields = append(fieldEvent.Fields, f.CloneVT())
}
tablePlan, err := state.plan.buildExecutionPlan(fieldEvent)
if err != nil {
return err
Expand Down Expand Up @@ -191,7 +195,6 @@ func (vc *vcopier) copyAll(ctx context.Context, settings binlogplayer.VRSettings
},
}
log.Infof("copying table %s with lastpk %v", tableName, lastpkbv)

// Prepare a vcopierCopyTask for the current batch of work.
currCh := make(chan *vcopierCopyTaskResult, 1)
currT := newVCopierCopyTask(newVCopierCopyTaskArgs(resp.Rows, resp.Lastpk))
Expand Down

0 comments on commit 2647b71

Please sign in to comment.