vitessio/vitess · error
GetTabletsByCell(%s) failed: %w
Error message
GetTabletsByCell(%s) failed: %w
What it means
In the cells-based path of GetTablets, vtctld queries every requested cell via s.ts.GetTabletsByCell and aggregates errors in an error recorder. Each per-cell failure is recorded with the cell name; with req.Strict set it also cancels the other cell RPCs immediately.
Source
Thrown at go/vt/vtctl/grpcvtctldserver/server.go:2408
m sync.Mutex
wg sync.WaitGroup
rec concurrency.AllErrorRecorder
allTablets []*topo.TabletInfo
)
for _, cell := range cells {
wg.Add(1)
go func(cell string) {
defer wg.Done()
tablets, err := s.ts.GetTabletsByCell(ctx, cell, nil)
if err != nil {
if req.Strict {
log.Info(fmt.Sprintf("GetTablets got an error from cell %s: %s. Running in strict mode, so canceling other cell RPCs", cell, err))
cancel()
}
rec.RecordError(fmt.Errorf("GetTabletsByCell(%s) failed: %w", cell, err))
return
}
m.Lock()
defer m.Unlock()
allTablets = append(allTablets, tablets...)
}(cell)
}
wg.Wait()
if rec.HasErrors() {
if req.Strict || len(rec.Errors) == len(cells) {
err = rec.Error()
return nil, err
}
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Confirm all requested cell names exist in the topo (`vtctldclient GetCellsAliasInfo` / topo cell list).
- Check connectivity to the failing cell's topo backend and fix the outage.
- Remove the unhealthy/removed cell from the request, or run without Strict so other cells still return results.
Example fix
// before vtctldclient GetTablets --cells "zone1,zone3" // after vtctldclient GetTablets --cells "zone1,zone2"
Defensive patterns
Strategy: fallback
Validate before calling
cells, err := s.ts.GetCellInfoNames(ctx)
if err != nil { return err }
for _, c := range req.Cells {
if !slices.Contains(cells, c) {
return fmt.Errorf("unknown cell %q", c)
}
} Try / catch
tablets, err := s.ts.GetTabletsByCell(ctx, cell, nil)
if err != nil {
if req.Strict { cancel() }
rec.RecordError(fmt.Errorf("GetTabletsByCell(%s) failed: %w", cell, err))
return
} Prevention
- Only request cells that exist in the topo
- Avoid Strict mode when partial results are acceptable during cell outages
- Monitor per-cell topo health
When it happens
Trigger: Calling GetTablets without aliases/keyspace-shard (the cells path) while GetTabletsByCell fails for a cell — cell name not in topo, topo connectivity failure for that cell's backend, or empty/invalid cell.
Common situations: Multi-cell clusters where one cell's topo backend is down or a cell was removed but still listed in the request; misconfigured --cells value.
Related errors
- GetTabletMap(%v) failed: %w
- GetTabletMapForShard(%s, %s) failed: %w
- GetTabletsByCell(%v): %w
- GetCellInfoNames(): %w
- GetKnownCells failed: %v
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/ba0b6137470f2257.
Report an issue: GitHub.