vitessio/vitess · error

ReloadSchemas(cluster = ) failed

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.

Solutions

  1. Inspect the wrapped inner error to identify the failing tablet/cluster and fix connectivity to vtctld/tablets
  2. Re-run ReloadSchemas for that cluster once the tablet is healthy
  3. 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

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


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

Appendix: 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)