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, stream: %d
What it means
This error is thrown by the legacy VReplication stream migrator (legacyReadTabletStreams) while enumerating rows in the _vt.vreplication table on a source shard's primary tablet. A stream whose `workflow` column equals the current resharding workflow's name cannot be migrated as part of a MoveTables/Reshard workflow migration, because migrating the resharding workflow itself would corrupt the in-progress reshard operation. The migrator hard-fails instead of silently skipping the stream.
Source
Thrown at go/vt/vtctl/workflow/stream_migrator.go:318
return nil, err
}
qr := sqltypes.Proto3ToResult(p3qr)
tabletStreams := make([]*VReplicationStream, 0, len(qr.Rows))
for _, row := range qr.Named().Rows {
id, err := row["id"].ToInt32()
if err != nil {
return nil, err
}
workflowName := row["workflow"].ToString()
switch workflowName {
case "":
return nil, fmt.Errorf("VReplication streams must have named workflows for migration: shard: %s:%s, stream: %d",
ti.Keyspace, ti.Shard, id)
case sm.ts.WorkflowName():
return nil, fmt.Errorf("VReplication stream has the same workflow name as the resharding workflow: shard: %s:%s, stream: %d",
ti.Keyspace, ti.Shard, id)
}
workflowType, err := row["workflow_type"].ToInt32()
if err != nil {
return nil, err
}
workflowSubType, err := row["workflow_sub_type"].ToInt32()
if err != nil {
return nil, err
}
deferSecondaryKeys, err := row["defer_secondary_keys"].ToBool()
if err != nil {
return nil, err
}
var bls binlogdatapb.BinlogSourceView on GitHub (pinned to 01a25a7d17)
Solutions
- Wait for the in-progress Reshard workflow to complete or cancel it before migrating streams (vtctldclient Reshard ... Cancel / Complete).
- Rename the offending VReplication stream to a non-reserved name (update _vt.vreplication set workflow='<newname>' where id=<stream id>) and retry.
- Delete the stale/residual stream if it is no longer needed (vtctldclient Workflow --workflow <name> Remove or DELETE from _vt.vreplication).
- Verify with `select id, workflow from _vt.vreplication` on the source shard primary that no row uses the reserved workflow name before retrying the migration.
Example fix
// before: stream row named identically to the reshard workflow mysql> select id, workflow from _vt.vreplication; -- id=5, workflow='reshard' // after: rename it before running stream migration mysql> update _vt.vreplication set workflow='sales_copy' where id=5;
Defensive patterns
Strategy: validation
Validate before calling
rows, _ := qr.Rows // query: select id, workflow from _vt.vreplication where db_name='...'
for _, r := range rows {
if r["workflow"].ToString() == reshardWorkflowName {
return fmt.Errorf("stream %d uses reserved reshard workflow name; rename or remove it first", id)
}
} Type guard
func usesReservedWorkflow(workflow, 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") {
// complete/cancel reshard or rename the offending stream, then retry
} Prevention
- Never create _vt.vreplication rows manually with the reserved reshard workflow name
- Complete or cancel any active Reshard workflow before running stream migration
- Audit _vt.vreplication workflow names before each migration
When it happens
Trigger: Calling MigrateStreams / workflow migration (e.g. `Workflow Migrate` / MoveTables with -workflow transfer) while a _vt.vreplication row on the source shard has workflow = sm.ts.WorkflowName(), i.e. the same name the reshard machinery uses (the 'reshard' internal workflow).
Common situations: Operators manually created a VReplication stream named with the reserved resharding workflow name; a prior failed/resumed reshard left a stream with the internal workflow name; running stream migration while a Reshard workflow is still active on the same keyspace.
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/65e914e25e5eac0c.
Report an issue: GitHub.