{"record":{"id":"da0692fc4e775393","repo":"vitessio/vitess","slug":"no-completed-or-stopped-vdiff-found-for-uuid-s-on","errorCode":null,"errorMessage":"no completed or stopped vdiff found for UUID %s on tablet %s","messagePattern":"no completed or stopped vdiff found for UUID (.+?) on tablet (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vttablet/tabletmanager/vdiff/action.go","lineNumber":265,"sourceCode":"\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\n\t\t}\n\t\trowsAffected, err := execResume(sqlResumeVDiff)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif rowsAffected == 0 { // See if it's a vdiff that was never started\n\t\t\trowsAffected, err := execResume(sqlStartVDiff)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif rowsAffected == 0 {\n\t\t\t\treturn fmt.Errorf(\"no completed or stopped vdiff found for UUID %s on tablet %s\",\n\t\t\t\t\treq.VdiffUuid, topoproto.TabletAliasString(vde.thisTablet.Alias))\n\t\t\t}\n\t\t}\n\t}\n\n\tresp.VdiffUuid = req.VdiffUuid\n\tqr, err = vde.getVDiffByID(ctx, dbClient, resp.Id)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvdiffRecord := qr.Named().Row()\n\tif vdiffRecord == nil {\n\t\treturn fmt.Errorf(\"unable to %s vdiff for UUID %s as it was not found on tablet %v (%w)\",\n\t\t\taction, req.VdiffUuid, topoproto.TabletAliasString(vde.thisTablet.Alias), err)\n\t}\n\tif action == ResumeAction {\n\t\t// Use the existing options from the vdiff record.\n\t\toptions = optionsZeroVal","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletmanager/vdiff/action.go#L247-L283","documentation":"When resuming, Vitess first tries to resume a completed/stopped vdiff; if no rows are affected it attempts to start (resume a never-started) vdiff, and if that also affects 0 rows, neither a completed/stopped nor an unstarted record matches the UUID, so it errors. The UUID exists conceptually but is not in a resumable state on this tablet.","triggerScenarios":"vdiff resume where the UUID's row is in a non-resumable state (already running/errored/cancelled) or missing on the tablet — both UPDATEs (resume and start) matched 0 rows in handleCreateResumeAction.","commonSituations":"Resuming a vdiff that is currently running; resuming one that was cancelled or completed and cleaned; using a UUID that was never created on this specific tablet; repeated resume after the record transitioned states.","solutions":["Run vdiff show to check the current state of the UUID on this tablet","If it's already running, wait or stop it instead of resuming","If it's in a bad state, delete it and create a fresh vdiff","Ensure you're targeting the tablet that actually holds the record"],"exampleFix":"// before\nvtctldclient VDiff resume --uuid xyz  // state=running\n// after\nvtctldclient VDiff show --uuid xyz    // inspect state\nvtctldclient VDiff delete --uuid xyz\nvtctldclient VDiff create && vtctldclient VDiff resume","handlingStrategy":"validation","validationCode":"qr, _ := dbClient.ExecuteFetch(\"SELECT state FROM _vt.vdiff_tablet WHERE uuid=?\", 1, true)\nif len(qr.Rows) == 0 { return errors.New(\"no such vdiff\") }\nstate, _ := qr.Named().Row()[\"state\"].ToString()\nif state != \"completed\" && state != \"stopped\" { return fmt.Errorf(\"non-resumable state: %s\", state) }","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"no completed or stopped vdiff found\") {\n    // inspect state; delete and re-create if unrecoverable\n}","preventionTips":["Check vdiff show state before resuming","Never resume while a vdiff is running","Clean up cancelled vdiffs and create fresh ones"],"tags":["vdiff","state-conflict","resume"],"backgroundTag":"invalid-state-transition","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}