{"record":{"id":"8f92b43ff48a5f66","repo":"vitessio/vitess","slug":"vreplication-streams-must-have-named-workflows-for-8f92b4","errorCode":null,"errorMessage":"VReplication streams must have named workflows for migration: shard: %s:%s, stream: %d","messagePattern":"VReplication streams must have named workflows for migration: shard: (.+?):(.+?), stream: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtctl/workflow/stream_migrator.go","lineNumber":315,"sourceCode":"\n\tp3qr, err := sm.ts.TabletManagerClient().VReplicationExec(ctx, ti.Tablet, query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tqr := sqltypes.Proto3ToResult(p3qr)\n\ttabletStreams := make([]*VReplicationStream, 0, len(qr.Rows))\n\n\tfor _, row := range qr.Named().Rows {\n\t\tid, err := row[\"id\"].ToInt32()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tworkflowName := row[\"workflow\"].ToString()\n\t\tswitch workflowName {\n\t\tcase \"\":\n\t\t\treturn nil, fmt.Errorf(\"VReplication streams must have named workflows for migration: shard: %s:%s, stream: %d\",\n\t\t\t\tti.Keyspace, ti.Shard, id)\n\t\tcase sm.ts.WorkflowName():\n\t\t\treturn nil, fmt.Errorf(\"VReplication stream has the same workflow name as the resharding workflow: shard: %s:%s, stream: %d\",\n\t\t\t\tti.Keyspace, ti.Shard, id)\n\t\t}\n\n\t\tworkflowType, err := row[\"workflow_type\"].ToInt32()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tworkflowSubType, err := row[\"workflow_sub_type\"].ToInt32()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tdeferSecondaryKeys, err := row[\"defer_secondary_keys\"].ToBool()\n\t\tif err != nil {\n\t\t\treturn nil, err","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/workflow/stream_migrator.go#L297-L333","documentation":"When reading existing VReplication streams on source tablets in legacy (pre-workflow-aware) mode, stream_migrator requires each stream row to have a non-empty workflow name, and additionally rejects streams whose workflow name collides with the resharding workflow itself. An empty workflow name makes the stream untrackable for migration, so the operation fails with the shard, and stream id identified.","triggerScenarios":"Running a stream migration (MigrateStreams) against a tablet whose _vt.vreplication table contains a row with an empty workflow column; or a stream named identically to the migration's target workflow name.","commonSituations":"Legacy streams created before named workflows existed; manual vreplication inserts without workflow; name collision when a previous migration used the same workflow name.","solutions":["Find the offending row (SELECT id, workflow FROM _vt.vreplication WHERE workflow='' or workflow='<reshard-workflow>') on the given shard and delete/rename it.","Choose a different workflow name for the migration to avoid the collision.","Upgrade legacy streams by re-creating them through supported MoveTables/Reshard commands."],"exampleFix":"-- before\nmysql> SELECT id FROM _vt.vreplication WHERE workflow='';\n-- after\nmysql> DELETE FROM _vt.vreplication WHERE id=<id>;","handlingStrategy":"validation","validationCode":"-- Audit tablets for legacy/unnamed streams and workflow name collisions before migrating\nSELECT id, workflow FROM _vt.vreplication WHERE workflow = '' OR workflow = '<migration-workflow-name>';","typeGuard":null,"tryCatchPattern":"err := client.MigrateStreams(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"must have named workflows for migration\") {\n    // clean/rename offending streams, or pick a different workflow name\n}","preventionTips":["Use unique, descriptive workflow names to avoid collisions","Remove or upgrade legacy unnamed streams before migrating","Never create vreplication rows manually without a workflow name"],"tags":["vreplication","migration","validation","naming"],"backgroundTag":"unnamed-vreplication-workflow","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}