vitessio/vitess · error

FindAllTabletAliasesInShard(%s, %s) failed: %v

Error message

FindAllTabletAliasesInShard(%s, %s) failed: %v

What it means

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.

Source

Thrown at go/vt/vtctl/grpcvtctldserver/server.go:5428

	}

	if !shard.HasPrimary() {
		err = fmt.Errorf("no primary in shard %v/%v", req.Keyspace, req.Shard)
		return nil, err
	}

	log.Info(fmt.Sprintf("Gathering version for primary %v", topoproto.TabletAliasString(shard.PrimaryAlias)))
	primaryVersion, err := s.GetVersion(ctx, &vtctldatapb.GetVersionRequest{
		TabletAlias: shard.PrimaryAlias,
	})
	if err != nil {
		err = fmt.Errorf("GetVersion(%s) failed: %v", topoproto.TabletAliasString(shard.PrimaryAlias), err)
		return nil, err
	}

	aliases, err := s.ts.FindAllTabletAliasesInShard(ctx, req.Keyspace, req.Shard)
	if err != nil {
		err = fmt.Errorf("FindAllTabletAliasesInShard(%s, %s) failed: %v", req.Keyspace, req.Shard, err)
		return nil, err
	}

	er := concurrency.AllErrorRecorder{}
	wg := sync.WaitGroup{}
	for _, alias := range aliases {
		if topoproto.TabletAliasEqual(alias, shard.PrimaryAlias) {
			continue
		}

		wg.Add(1)
		go func(alias *topodatapb.TabletAlias) {
			s.diffVersion(ctx, primaryVersion.Version, shard.PrimaryAlias, alias, &wg, &er)
		}(alias)
	}

	wg.Wait()

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Verify topo backend health and vtctld topo configuration flags.
  2. Re-run the command once the topo is stable.
  3. Confirm the keyspace/shard still exists (vtctldclient GetShards).
Defensive patterns

Strategy: retry

Validate before calling

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 */ }

Try / catch

aliases, err := ts.FindAllTabletAliasesInShard(ctx, ks, shard); if err != nil { if isTopoUnavailable(err) { time.Sleep(backoff); retry() }; return err }

Prevention

When it happens

Trigger: Topo backend error while listing tablets for keyspace/shard during ValidateShard.

Common situations: etcd/ZK outage or election instability; misconfigured topo server flags on vtctld; keyspace/shard record deleted concurrently.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/552daa53731bacb5. Report an issue: GitHub.