vitessio/vitess · error
VReplication stream has the same workflow name as the reshar
Error message
VReplication stream has the same workflow name as the resharding workflow: shard: %s:%s
What it means
Thrown by readTabletStreams when one of the source tablet's VReplication workflows has exactly the same name as the resharding workflow currently being built. Migrating the reshard workflow's own streams would be self-referential and break resharding, so the migrator refuses and reports the shard.
Source
Thrown at go/vt/vtctl/workflow/stream_migrator.go:396
IncludeIds: ids,
IncludeStates: states,
ExcludeFrozen: excludeFrozen,
}
res, err := sm.ts.TabletManagerClient().ReadVReplicationWorkflows(ctx, ti.Tablet, req)
if err != nil {
return nil, err
}
tabletStreams := make([]*VReplicationStream, 0, len(res.Workflows))
for _, workflow := range res.Workflows {
switch workflow.Workflow {
case "":
return nil, fmt.Errorf("VReplication streams must have named workflows for migration: shard: %s:%s",
ti.Keyspace, ti.Shard)
case sm.ts.WorkflowName():
return nil, fmt.Errorf("VReplication stream has the same workflow name as the resharding workflow: shard: %s:%s",
ti.Keyspace, ti.Shard)
}
for _, stream := range workflow.Streams {
isReference, err := sm.blsIsReference(stream.Bls)
if err != nil {
return nil, vterrors.Wrap(err, "blsIsReference")
}
if isReference {
sm.ts.Logger().Infof("readTabletStreams: ignoring reference table %+v", stream.Bls)
continue
}
pos, err := replication.DecodePosition(stream.Pos)
if err != nil {
return nil, err
}View on GitHub (pinned to 01a25a7d17)
Solutions
- Complete or cancel the active Reshard workflow first (vtctldclient Reshard Complete / Cancel), then retry the stream migration.
- Remove leftover reshard workflow streams: vtctldclient Workflow --workflow <reshard-workflow-name> Remove on the affected keyspace.
- Rename any legitimately needed stream that collides with the reserved name (`update _vt.vreplication set workflow=...`).
- Check `_vt.vreplication` on all source shard primaries for rows whose workflow equals the resharding workflow name before migrating.
Example fix
// before: attempt migrate with reshard still present $ vtctldclient Workflow --keyspace customer Migrate ... // after: finish reshard first $ vtctldclient Reshard --workflow rebuy customer/0- Complete $ vtctldclient Workflow --keyspace customer Migrate ...
Defensive patterns
Strategy: validation
Validate before calling
res, _ := tmclient.ReadVReplicationWorkflows(ctx, tablet, req)
for _, wf := range res.Workflows {
if wf.Workflow == "reshard" /* sm.ts.WorkflowName() */ {
return fmt.Errorf("complete or cancel the reshard workflow before migrating streams")
}
} Type guard
func isReshardWorkflow(workflow string, reshardWorkflow string) bool {
return workflow == reshardWorkflow
} Try / catch
err := migrateStreams(ctx, cfg)
if err != nil && strings.Contains(err.Error(), "same workflow name as the resharding workflow") {
// run Reshard Complete/Cancel or Workflow Remove first
} Prevention
- Finish reshard workflows before starting stream migration
- Clean up cancelled reshards with Workflow Remove
- Check Workflow --keyspace list for the reserved name before migrating
When it happens
Trigger: Running MigrateStreams / workflow migration while the source shard still contains streams belonging to the internal reshard workflow (workflow == sm.ts.WorkflowName()) — e.g. transferring streams before the reshard completes.
Common situations: Attempting stream migration during an active Reshard; leftover streams from a cancelled/incomplete reshard that still carry the reserved internal workflow name.
Related errors
- VReplication stream has the same workflow name as the reshar
- source shard %v is not in serving state
- target shard %v has no primary tablet
- target shard %v is in serving state
- VReplication streams must have named workflows for migration
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/0a665f6c9d3742ff.
Report an issue: GitHub.