{"record":{"id":"552daa53731bacb5","repo":"vitessio/vitess","slug":"findalltabletaliasesinshard-s-s-failed-v","errorCode":null,"errorMessage":"FindAllTabletAliasesInShard(%s, %s) failed: %v","messagePattern":"FindAllTabletAliasesInShard\\((.+?), (.+?)\\) failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtctl/grpcvtctldserver/server.go","lineNumber":5428,"sourceCode":"\t}\n\n\tif !shard.HasPrimary() {\n\t\terr = fmt.Errorf(\"no primary in shard %v/%v\", req.Keyspace, req.Shard)\n\t\treturn nil, err\n\t}\n\n\tlog.Info(fmt.Sprintf(\"Gathering version for primary %v\", topoproto.TabletAliasString(shard.PrimaryAlias)))\n\tprimaryVersion, err := s.GetVersion(ctx, &vtctldatapb.GetVersionRequest{\n\t\tTabletAlias: shard.PrimaryAlias,\n\t})\n\tif err != nil {\n\t\terr = fmt.Errorf(\"GetVersion(%s) failed: %v\", topoproto.TabletAliasString(shard.PrimaryAlias), err)\n\t\treturn nil, err\n\t}\n\n\taliases, err := s.ts.FindAllTabletAliasesInShard(ctx, req.Keyspace, req.Shard)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"FindAllTabletAliasesInShard(%s, %s) failed: %v\", req.Keyspace, req.Shard, err)\n\t\treturn nil, err\n\t}\n\n\ter := concurrency.AllErrorRecorder{}\n\twg := sync.WaitGroup{}\n\tfor _, alias := range aliases {\n\t\tif topoproto.TabletAliasEqual(alias, shard.PrimaryAlias) {\n\t\t\tcontinue\n\t\t}\n\n\t\twg.Add(1)\n\t\tgo func(alias *topodatapb.TabletAlias) {\n\t\t\ts.diffVersion(ctx, primaryVersion.Version, shard.PrimaryAlias, alias, &wg, &er)\n\t\t}(alias)\n\t}\n\n\twg.Wait()\n","sourceCodeStart":5410,"sourceCodeEnd":5446,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/grpcvtctldserver/server.go#L5410-L5446","documentation":"ValidateShard enumerates all tablet aliases in the shard via ts.FindAllTabletAliasesInShard; a topo read failure is wrapped as \"FindAllTabletAliasesInShard(%s, %s) failed: %v\" with keyspace and shard, aborting the validation.","triggerScenarios":"Topo backend error while listing tablets for keyspace/shard during ValidateShard.","commonSituations":"etcd/ZK outage or election instability; misconfigured topo server flags on vtctld; keyspace/shard record deleted concurrently.","solutions":["Verify topo backend health and vtctld topo configuration flags.","Re-run the command once the topo is stable.","Confirm the keyspace/shard still exists (vtctldclient GetShards)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"ctx, cancel := context.WithTimeout(ctx, 5*time.Second); defer cancel(); _, err := ts.FindAllTabletAliasesInShard(ctx, ks, shard); if err != nil { /* topo unreachable — check etcd/zk before retry */ }","typeGuard":null,"tryCatchPattern":"aliases, err := ts.FindAllTabletAliasesInShard(ctx, ks, shard); if err != nil { if isTopoUnavailable(err) { time.Sleep(backoff); retry() }; return err }","preventionTips":["Monitor topo backend (etcd/zk) health","Keep vtctld topo flags consistent across deployments","Retry idempotent validation commands on transient topo errors"],"tags":["topo","shard","vtctld","network"],"backgroundTag":"topo-unavailable","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}