vitessio/vitess · warning

GetCellInfoNames() failed to acquire topoReadPool: %w

Error message

GetCellInfoNames() failed to acquire topoReadPool: %w

What it means

GetCellInfos needs the list of cell names when the caller did not supply any, so it takes a topoReadPool slot before calling GetCellInfoNames. If Acquire fails (context done while waiting), the whole call returns this error instead of proceeding to the vtctld RPC.

Source

Thrown at go/vt/vtadmin/cluster/cluster.go:1054

}

// GetCellInfos returns a list of ClusterCellInfo objects for cells in the
// given cluster.
//
// If req.Cells is set, cells are restricted only to cells with those names.
// Note: specifying a cell name that does not exist in the cluster fails the
// overall request.
//
// If req.NamesOnly is set, each ClusterCellInfo will only contain the Cluster
// and Name fields. req.Cells takes precedence over this option.
func (c *Cluster) GetCellInfos(ctx context.Context, req *vtadminpb.GetCellInfosRequest) ([]*vtadminpb.ClusterCellInfo, error) {
	span, ctx := trace.NewSpan(ctx, "Cluster.GetCellInfos")
	defer span.Finish()

	names := req.Cells
	if len(names) == 0 {
		if err := c.topoReadPool.Acquire(ctx); err != nil {
			return nil, fmt.Errorf("GetCellInfoNames() failed to acquire topoReadPool: %w", err)
		}
		resp, err := c.Vtctld.GetCellInfoNames(ctx, &vtctldatapb.GetCellInfoNamesRequest{})
		c.topoReadPool.Release()

		if err != nil {
			return nil, fmt.Errorf("failed to GetCellInfoNames: %w", err)
		}

		names = resp.Names
	}

	namesOnly := req.NamesOnly
	if namesOnly && len(req.Cells) > 0 {
		log.Warn("Cluster.GetCellInfos: req.Cells and req.NamesOnly set, ignoring NamesOnly")
		namesOnly = false
	}

	span.Annotate("names_only", namesOnly)

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Retry with a longer deadline
  2. Increase topoReadPool size
  3. Pass explicit cell names in the request to skip the pool-gated name lookup
  4. Reduce concurrent cell-info requests

Example fix

// before (caller had no cells, hit pool wait)
req := &vtadminpb.GetCellInfosRequest{}
// after: supply cells to avoid the name-listing path
req := &vtadminpb.GetCellInfosRequest{Cells: []string{"zone1", "zone2"}}
Defensive patterns

Strategy: fallback

Validate before calling

// avoid the pool-gated path by supplying cell names explicitly
req := &vtadminpb.GetCellInfosRequest{Cells: knownCells} // len(req.Cells) > 0 skips Acquire

Try / catch

cells, err := cluster.GetCellInfos(ctx, req)
if err != nil && strings.Contains(err.Error(), "topoReadPool") {
    // retry with longer ctx or pass Cells explicitly
}

Prevention

When it happens

Trigger: Calling GetCellInfos with an empty req.Cells while topoReadPool is exhausted and ctx is canceled/deadlined during Acquire.

Common situations: Dashboards listing all cells concurrently; small topo pool under burst load; request deadline shorter than pool wait time.

Related errors


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