vitessio/vitess · error
schema change failed, ExecuteResult: %v
Error message
schema change failed, ExecuteResult: %v
What it means
schemamanager's Run completes and reports failure via a single error summarizing the ExecuteResult: either the executor reported an error string (ExecutorErr) or some shards failed. The full marshaled ExecuteResult JSON is embedded in the message so operators can see per-shard outcomes.
Source
Thrown at go/vt/schemamanager/schemamanager.go:133
defer executor.Close()
if err := executor.Validate(ctx, sqls); err != nil {
log.Error(fmt.Sprintf("validation fail: %v", err))
controller.OnValidationFail(ctx, err)
return execResult, err
}
if err := controller.OnValidationSuccess(ctx); err != nil {
return execResult, err
}
execResult = executor.Execute(ctx, sqls)
if err := controller.OnExecutorComplete(ctx, execResult); err != nil {
return execResult, err
}
if execResult.ExecutorErr != "" || len(execResult.FailedShards) > 0 {
out, _ := json.MarshalIndent(execResult, "", " ")
return execResult, fmt.Errorf("schema change failed, ExecuteResult: %v", string(out))
}
return execResult, nil
}
// RegisterControllerFactory register a control factory.
func RegisterControllerFactory(name string, factory ControllerFactory) {
if _, ok := controllerFactories[name]; ok {
panic("register a registered key: " + name)
}
controllerFactories[name] = factory
}
// GetControllerFactory gets a ControllerFactory.
func GetControllerFactory(name string) (ControllerFactory, error) {
factory, ok := controllerFactories[name]
if !ok {
return nil, fmt.Errorf("there is no data sourcer factory with name: %s", name)
}View on GitHub (pinned to 01a25a7d17)
Solutions
- Parse the ExecuteResult JSON in the error message to find ExecutorErr and the failed shards list
- Inspect the failing tablets' logs (vttablet) for the underlying migration error
- Retry/revert the failed migration (e.g. vtctldclient UndoMigration or RetryMigration with the UUID) and re-run
Defensive patterns
Strategy: try-catch
Try / catch
result, err := mgr.Run(ctx)
if err != nil {
var execRes *schemamanager.ExecuteResult
if errors.As(err, &execRes) || strings.HasPrefix(err.Error(), "schema change failed") {
// parse JSON from the message for ExecutorErr and FailedShards
}
} Prevention
- Monitor ExecuteResult.FailedShards to alert on partial application
- Test migrations on staging keyspace first
- Keep vttablet logs correlated with migration UUIDs
When it happens
Trigger: Running a schema change where TabletExecutor sets ExecutorErr (e.g. a migration failed on a tablet) or FailedShards is non-empty after applying statements to the keyspace.
Common situations: Online DDL migration failed on one or more shards; session or tablet errors during ALTER; a partially applied schema change where some primaries rejected the statement.
Related errors
- Not a valid UUID: %s
- direct DDL is disabled
- online DDL is disabled
- Foreign key found
- RENAME clause found
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/476cce5915a7cc49.
Report an issue: GitHub.