{"record":{"id":"e90336b06787eb30","repo":"vitessio/vitess","slug":"checkpoint-information-not-available-in-db-for-v","errorCode":null,"errorMessage":"checkpoint information not available in db for %v","messagePattern":"checkpoint information not available in db for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/binlog/binlogplayer/binlog_player.go","lineNumber":581,"sourceCode":"\tMaxReplicationLag  int64\n\tState              binlogdatapb.VReplicationWorkflowState\n\tWorkflowType       binlogdatapb.VReplicationWorkflowType\n\tWorkflowSubType    binlogdatapb.VReplicationWorkflowSubType\n\tWorkflowName       string\n\tDeferSecondaryKeys bool\n\tWorkflowOptions    *vtctldata.WorkflowOptions\n}\n\n// ReadVRSettings retrieves the settings for a vreplication stream.\nfunc ReadVRSettings(dbClient DBClient, uid int32) (VRSettings, error) {\n\tquery := fmt.Sprintf(GetWorkflowQuery, uid)\n\tqr, err := dbClient.ExecuteFetch(query, 1)\n\tif err != nil {\n\t\treturn VRSettings{}, fmt.Errorf(\"error %v in selecting vreplication settings %v\", err, query)\n\t}\n\n\tif len(qr.Rows) != 1 {\n\t\treturn VRSettings{}, fmt.Errorf(\"checkpoint information not available in db for %v\", uid)\n\t}\n\tvrRow := qr.Named().Row()\n\n\tmaxTPS, err := vrRow.ToInt64(\"max_tps\")\n\tif err != nil {\n\t\treturn VRSettings{}, fmt.Errorf(\"failed to parse max_tps column: %v\", err)\n\t}\n\tmaxReplicationLag, err := vrRow.ToInt64(\"max_replication_lag\")\n\tif err != nil {\n\t\treturn VRSettings{}, fmt.Errorf(\"failed to parse max_replication_lag column: %v\", err)\n\t}\n\tstartPos, err := DecodePosition(vrRow.AsString(\"pos\", \"\"))\n\tif err != nil {\n\t\treturn VRSettings{}, fmt.Errorf(\"failed to parse pos column: %v\", err)\n\t}\n\tstopPos, err := replication.DecodePosition(vrRow.AsString(\"stop_pos\", \"\"))\n\tif err != nil {\n\t\treturn VRSettings{}, fmt.Errorf(\"failed to parse stop_pos column: %v\", err)","sourceCodeStart":563,"sourceCodeEnd":599,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/binlog/binlogplayer/binlog_player.go#L563-L599","documentation":"After successfully executing the SELECT on _vt.vreplication for the given uid, exactly one row is expected. Zero (or, given the fetch limit, missing) rows means no checkpoint row exists for that stream id, so the settings cannot be loaded. This is the 'stream was never created or already removed' case.","triggerScenarios":"ReadVRSettings called with a uid that has no row in _vt.vreplication: workflow was already completed/pruned, wrong uid passed, target keyspace/tablet queried instead of the source, or the vreplication table was truncated/re-created during recovery.","commonSituations":"VExec or manual DELETE removed the row while the controller was running; querying the wrong tablet (target instead of source) for the stream; uid mismatch after re-running a workflow that got a new id; workflow migration between shards.","solutions":["Confirm the uid exists: `select * from _vt.vreplication` (via vtctldclient GetWorkflows or VExec) on the correct tablet.","Verify you are querying the correct keyspace/tablet (source for the stream, not target).","If the row was deleted intentionally, cancel the workflow cleanly and start a new one rather than reusing the old uid.","Re-create the workflow (MoveTables/Reshard) if the checkpoint row was lost."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"qr, err := dbClient.ExecuteFetch(fmt.Sprintf(\"SELECT uid FROM _vt.vreplication WHERE uid=%d\", uid), 1)\nif err != nil { return err }\nif len(qr.Rows) == 0 {\n\treturn fmt.Errorf(\"uid %d does not exist; check `GetWorkflows` before using ReadVRSettings\", uid)\n}","typeGuard":null,"tryCatchPattern":"settings, err := binlogplayer.ReadVRSettings(dbClient, uid)\nif err != nil && strings.Contains(err.Error(), \"checkpoint information not available\") {\n\t// stream row absent: treat as 'workflow gone', re-enumerate streams\n\treturn listWorkflowsAndRebind(dbClient)\n}","preventionTips":["Always discover uids via vtctldclient GetWorkflows instead of hardcoding.","Never manually DELETE from _vt.vreplication while a controller runs; use VExec/workflow cancel.","Confirm you are querying the correct keyspace/tablet (source side).","After restores or pruning, re-create workflows rather than reusing old uids."],"tags":["vreplication","missing-row","mysql","workflow"],"backgroundTag":"vreplication-checkpoint-missing","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}