{"record":{"id":"c9430b65edc9253e","repo":"vitessio/vitess","slug":"getcellsaliases-failed-to-acquire-toporeadpool","errorCode":null,"errorMessage":"GetCellsAliases() failed to acquire topoReadPool: %w","messagePattern":"GetCellsAliases\\(\\) failed to acquire topoReadPool: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"go/vt/vtadmin/cluster/cluster.go","lineNumber":1137,"sourceCode":"\t\t\t})\n\t\t}(name)\n\t}\n\n\twg.Wait()\n\tif rec.HasErrors() {\n\t\treturn nil, rec.Error()\n\t}\n\n\treturn infos, nil\n}\n\n// GetCellsAliases returns all CellsAliases in the cluster.\nfunc (c *Cluster) GetCellsAliases(ctx context.Context) (*vtadminpb.ClusterCellsAliases, error) {\n\tspan, ctx := trace.NewSpan(ctx, \"Cluster.GetCellsAliases\")\n\tdefer span.Finish()\n\n\tif err := c.topoReadPool.Acquire(ctx); err != nil {\n\t\treturn nil, fmt.Errorf(\"GetCellsAliases() failed to acquire topoReadPool: %w\", err)\n\t}\n\tdefer c.topoReadPool.Release()\n\n\tresp, err := c.Vtctld.GetCellsAliases(ctx, &vtctldatapb.GetCellsAliasesRequest{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &vtadminpb.ClusterCellsAliases{\n\t\tCluster: c.ToProto(),\n\t\tAliases: resp.Aliases,\n\t}, nil\n}\n\n// GetGates returns the list of all VTGates in the cluster.\nfunc (c *Cluster) GetGates(ctx context.Context) ([]*vtadminpb.VTGate, error) {\n\t// (TODO|@ajm188) Support tags in the vtadmin RPC request and pass them\n\t// through here.","sourceCodeStart":1119,"sourceCodeEnd":1155,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtadmin/cluster/cluster.go#L1119-L1155","documentation":"GetCellsAliases takes a topoReadPool slot before querying the topology for cell aliases. Acquire failure means the request context ended while waiting for a pool slot, so aliases cannot be fetched and the error is returned to the caller directly (not recorded on a collector).","triggerScenarios":"Calling GetCellsAliases while topoReadPool is exhausted and ctx is canceled/deadlined during c.topoReadPool.Acquire(ctx).","commonSituations":"Heavy concurrent topo reads (cells, keyspaces, aliases) exhausting the shared pool; short client deadlines; burst dashboard load.","solutions":["Retry with a longer deadline","Increase topoReadPool size in cluster config","Reduce concurrent topology-heavy requests","Check for leaked/stuck Acquire holders (slow vtctld RPCs) and fix the underlying slowness"],"exampleFix":"// before\nctx, cancel := context.WithTimeout(ctx, 2*time.Second)\n// after: allow enough headroom for pool wait + RPC\nctx, cancel := context.WithTimeout(ctx, 30*time.Second)","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"aliases, err := cluster.GetCellsAliases(ctx)\nif err != nil {\n    if errors.Is(err, context.DeadlineExceeded) {\n        // pool/timeout pressure: retry with a longer deadline\n    }\n    return err\n}","preventionTips":["Keep topoReadPool sized to concurrent topo readers","Avoid many simultaneous topology calls per render","Use client deadlines with headroom","Alert on sustained pool saturation"],"tags":["vtadmin","semaphore","topology","timeout"],"backgroundTag":"semaphore-acquire-cancelled","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}