{"record":{"id":"e72b8fd0207fb616","repo":"vitessio/vitess","slug":"failed-to-get-tablet-s-from-topology-v","errorCode":null,"errorMessage":"failed to get tablet %s from topology: %v","messagePattern":"failed to get tablet (.+?) from topology: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/mysqlctl/clone.go","lineNumber":107,"sourceCode":"\t\t\treturn replication.Position{}, fmt.Errorf(\"shard %s/%s has no primary\", keyspace, shard)\n\t\t}\n\t\tdonorAlias = si.PrimaryAlias\n\t\tlog.Info(fmt.Sprintf(\"Found primary tablet %s for use as CLONE REMOTE donor\", topoproto.TabletAliasString(donorAlias)))\n\tcase cloneFromTablet != \"\":\n\t\t// Parse the explicit donor tablet alias.\n\t\tlog.Info(fmt.Sprintf(\"Using tablet %s for use as CLONE REMOTE donor\", cloneFromTablet))\n\t\tdonorAlias, err = topoproto.ParseTabletAlias(cloneFromTablet)\n\t\tif err != nil {\n\t\t\treturn replication.Position{}, fmt.Errorf(\"invalid tablet alias %q: %v\", cloneFromTablet, err)\n\t\t}\n\tdefault:\n\t\treturn replication.Position{}, errors.New(\"no donor specified\")\n\t}\n\n\t// Get donor tablet info from topology.\n\tdonorTablet, err := topoServer.GetTablet(ctx, donorAlias)\n\tif err != nil {\n\t\treturn replication.Position{}, fmt.Errorf(\"failed to get tablet %s from topology: %v\", topoproto.TabletAliasString(donorAlias), err)\n\t}\n\n\t// Get clone credentials.\n\tcloneConfig := dbconfigs.GlobalDBConfigs.CloneUser\n\tif cloneConfig.User == \"\" {\n\t\treturn replication.Position{}, errors.New(\"clone user not configured; set --db-clone-user flag\")\n\t}\n\n\t// Create the clone executor.\n\texecutor := &CloneExecutor{\n\t\tDonorHost:     donorTablet.MysqlHostname,\n\t\tDonorPort:     int(donorTablet.MysqlPort),\n\t\tDonorUser:     cloneConfig.User,\n\t\tDonorPassword: cloneConfig.Password,\n\t\tUseSSL:        cloneConfig.UseSSL,\n\t}\n\n\tlog.Info(fmt.Sprintf(\"Clone executor configured for donor %s:%d\", executor.DonorHost, executor.DonorPort))","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/mysqlctl/clone.go#L89-L125","documentation":"Returned by mysqlctl clone logic when the tablet identified by the given alias cannot be fetched from the topology service, wrapping the underlying topo error.","triggerScenarios":"CloneFromDonor with an alias whose tablet record was deleted from topo, an unreachable topo backend, or an alias from a different topo server/environment.","commonSituations":"Tablet was decommissioned but alias still referenced in configs; topo outage; running restore against a different cluster's topo; stale shard record after tablet removal.","solutions":["Confirm the tablet still exists with `vtctldclient GetTablet <alias>`.","Pick an existing donor tablet alias from `vtctldclient GetTablets`.","Check topology server connectivity.","If the alias is stale, remove the stale record (`DeleteTablet`) and select a live donor."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"tablet, err := topoServer.GetTablet(ctx, donorAlias)\nif err != nil {\n\treturn fmt.Errorf(\"donor %s unavailable: %w\", topoproto.TabletAliasString(donorAlias), err)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"failed to get tablet\") {\n\t// pick another donor alias or fix topo connectivity\n}","preventionTips":["Resolve donor alias fresh from topo at restore time","Remove stale tablet records after decommissioning"],"tags":["topology","clone","tablet"],"backgroundTag":"topo-tablet-not-found","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}