vitessio/vitess · error
ReloadSchemas(cluster = %s) failed: %w
Error message
ReloadSchemas(cluster = %s) failed: %w
What it means
During batch ReloadSchemas across clusters, VTAdmin records this error per cluster when c.ReloadSchemas fails; the wrapped error from the vtctld RPC is preserved. The overall call still returns other clusters' results, but this cluster's reload failed.
Source
Thrown at go/vt/vtadmin/api.go:2243
m sync.Mutex
wg sync.WaitGroup
rec concurrency.AllErrorRecorder
resp vtadminpb.ReloadSchemasResponse
)
for _, c := range clusters {
if !api.authz.IsAuthorized(ctx, c.ID, rbac.SchemaResource, rbac.ReloadAction) {
continue
}
wg.Add(1)
go func(c *cluster.Cluster) {
defer wg.Done()
cr, err := c.ReloadSchemas(ctx, req)
if err != nil {
rec.RecordError(fmt.Errorf("ReloadSchemas(cluster = %s) failed: %w", c.ID, err))
return
}
m.Lock()
defer m.Unlock()
resp.KeyspaceResults = append(resp.KeyspaceResults, cr.KeyspaceResults...)
resp.ShardResults = append(resp.ShardResults, cr.ShardResults...)
resp.TabletResults = append(resp.TabletResults, cr.TabletResults...)
}(c)
}
wg.Wait()
if rec.HasErrors() {
return nil, rec.Error()
}
return &resp, nil
}View on GitHub (pinned to 01a25a7d17)
Solutions
- Inspect the wrapped inner error to identify the failing tablet/cluster and fix connectivity to vtctld/tablets
- Re-run ReloadSchemas for that cluster once the tablet is healthy
- Remove stale/decommissioned clusters or tablets from the vtadmin cluster config
Defensive patterns
Strategy: try-catch
Validate before calling
// ensure the cluster is reachable before batch reload
for _, c := range clusters {
if _, err := c.GetVtctld(ctx); err != nil {
log.Printf("skipping unreachable cluster %s", c.ID)
}
} Try / catch
resp, err := client.ReloadSchemas(ctx, req)
if err != nil {
var perCluster []string
if errors.As(err, &agg) { /* collect per-cluster failures */ }
log.Printf("ReloadSchemas partial failure: %v", err)
// inspect resp.KeyspaceResults for clusters that succeeded and retry the rest
} Prevention
- Monitor tablet health so reloads are not issued against dead tablets
- Retry per-cluster reloads idempotently after transient vtctld failures
- Keep vtadmin's cluster list in sync with decommissioned clusters
When it happens
Trigger: Calling API.ReloadSchemas when the underlying vtctld ReloadSchemas RPC for one cluster fails (tablet unreachable, vtctld down, RPC timeout).
Common situations: A tablet was decommissioned or is down while its cluster is still registered in vtadmin; network partition between vtadmin and vtctld; MySQL restarted and tablet schema manager is unhealthy.
Related errors
- GetSchema(cluster = %s, keyspace = %s, tablet = %s) failed:
- invalid key:value pair
- Error setting tablet to read-only: %w
- Error setting tablet to read-write: %w
- GetKeyspaces(cluster = %s) failed: %w
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/1e1fe131265bd84a.
Report an issue: GitHub.