{"record":{"id":"54e2a568196c7167","repo":"vitessio/vitess","slug":"vdiff-with-uuid-s-not-found-on-tablet-s","errorCode":null,"errorMessage":"vdiff with UUID %s not found on tablet %s","messagePattern":"vdiff with UUID (.+?) not found on tablet (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vttablet/tabletmanager/vdiff/action.go","lineNumber":235,"sourceCode":"\t\t\tsqltypes.StringBindVariable(string(optionsJSON)),\n\t\t\tsqltypes.StringBindVariable(vde.thisTablet.Shard),\n\t\t\tsqltypes.StringBindVariable(topoproto.TabletDbName(vde.thisTablet)),\n\t\t\tsqltypes.StringBindVariable(req.VdiffUuid),\n\t\t)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif qr, err = dbClient.ExecuteFetch(query, 1); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif qr.InsertID == 0 {\n\t\t\treturn fmt.Errorf(\"unable to create vdiff for UUID %s on tablet %s (%w)\",\n\t\t\t\treq.VdiffUuid, topoproto.TabletAliasString(vde.thisTablet.Alias), err)\n\t\t}\n\t\tresp.Id = int64(qr.InsertID)\n\t} else {\n\t\tif !recordFound {\n\t\t\treturn fmt.Errorf(\"vdiff with UUID %s not found on tablet %s\",\n\t\t\t\treq.VdiffUuid, topoproto.TabletAliasString(vde.thisTablet.Alias))\n\t\t}\n\t\tif resp.Id, err = qr.Named().Row().ToInt64(\"id\"); err != nil {\n\t\t\treturn fmt.Errorf(\"vdiff found with invalid id on tablet %s: %w\",\n\t\t\t\ttopoproto.TabletAliasString(vde.thisTablet.Alias), err)\n\t\t}\n\t\texecResume := func(query string) (rowsAffected uint64, err error) {\n\t\t\tquery, err = sqlparser.ParseAndBind(query,\n\t\t\t\tsqltypes.StringBindVariable(req.VdiffUuid),\n\t\t\t\tsqltypes.StringBindVariable(vde.dbName),\n\t\t\t)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\tif qr, err = dbClient.ExecuteFetch(query, 1); err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\treturn qr.RowsAffected, nil","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletmanager/vdiff/action.go#L217-L253","documentation":"For a ResumeAction (or any non-create action) where the record query indicated a row existed (recordFound true path handled elsewhere), Vitess errors if no vdiff record with the given UUID exists on this tablet. Each tablet stores its own vdiff rows, so a UUID valid on one tablet may be missing on another.","triggerScenarios":"Calling vdiff resume (or action other than create) with a UUID that has no row in _vt.vdiff_tablet on the targeted tablet; targeting the wrong tablet alias.","commonSituations":"vdiff was created on a different tablet or already deleted; resuming before ever creating; cluster rebuilt/wiped losing _vt tables; passing a workflow-wide UUID to a tablet that never stored it.","solutions":["Run vdiff show to list UUIDs present on this tablet","Create the vdiff first if it never existed, then resume","Target the correct tablet with --tablet-uuid where the vdiff record lives","If the record was deleted intentionally, start a fresh vdiff with a new UUID"],"exampleFix":"// before\nvtctldclient VDiff resume --tablet-uuid tablet-a --uuid unknown-uuid\n// after: create first, then resume\nvtctldclient VDiff create --tablet-uuid tablet-a\nvtctldclient VDiff resume --tablet-uuid tablet-a","handlingStrategy":"validation","validationCode":"qr, _ := dbClient.ExecuteFetch(\"SELECT id FROM _vt.vdiff_tablet WHERE uuid=?\", 1, true)\nif len(qr.Rows) == 0 { return errors.New(\"vdiff UUID not present on this tablet; create first\") }","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"not found on tablet\") {\n    // create the vdiff or retarget the correct tablet\n}","preventionTips":["Confirm the record exists via vdiff show before resume/delete","Always pass --tablet-uuid matching where the vdiff was created","Avoid deleting records you still intend to resume"],"tags":["vdiff","missing-record","wrong-tablet"],"backgroundTag":"record-not-found","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}