vitessio/vitess · error
--batch-size conflicts with --uuid-list. Batching does not s
Error message
--batch-size conflicts with --uuid-list. Batching does not support UUIDs.
What it means
When batching is enabled (--batch-size > 1), schemamanager generates UUIDs for the batched statements itself and cannot honor an explicit --uuid-list. Execute checks hasProvidedUUIDs() and refuses the combination because batch grouping would desynchronize the provided UUID-per-statement mapping.
Source
Thrown at go/vt/schemamanager/tablet_executor.go:470
exec.logger,
exec.keyspace,
result.Shard,
result.Position,
concurrency,
true, /* includePrimary */
)
}(result)
}
wg.Wait()
}()
if exec.batchSize > 1 {
// Before we proceed to batch, we need to validate there's no conflicts.
if !exec.isDirectStrategy() {
return errorExecResult(errors.New("--batch-size requires 'direct' ddl_strategy"))
}
if exec.hasProvidedUUIDs() {
return errorExecResult(errors.New("--batch-size conflicts with --uuid-list. Batching does not support UUIDs."))
}
allSQLsAreCreate, err := allSQLsAreCreateQueries(sqls, exec.parser)
if err != nil {
return errorExecResult(err)
}
if !allSQLsAreCreate {
return errorExecResult(errors.New("--batch-size only allowed when all queries are CREATE TABLE|VIEW"))
}
sqls = batchSQLs(sqls, int(exec.batchSize))
}
for index, sql := range sqls {
// Attempt to renew lease:
if err := rl.Do(func() error { return topo.CheckKeyspaceLocked(ctx, exec.keyspace) }); err != nil {
return errorExecResult(vterrors.Wrapf(err, "CheckKeyspaceLocked in ApplySchemaKeyspace %v", exec.keyspace))
}
execResult.CurSQLIndex = index
if exec.hasProvidedUUIDs() {View on GitHub (pinned to 01a25a7d17)
Solutions
- Remove --uuid-list when using --batch-size and let the manager generate UUIDs
- Remove --batch-size to keep explicit UUID control per statement
- Split the workload: batch the ad-hoc DDL, run UUID-controlled migrations separately
Example fix
// before vtctldclient ApplySchema --sql-file d.sql --batch-size 5 --uuid-list a,b,c ks // after vtctldclient ApplySchema --sql-file d.sql --batch-size 5 ks
Defensive patterns
Strategy: validation
Validate before calling
if batchSize > 1 && uuidList != "" {
return errors.New("--batch-size cannot be combined with --uuid-list")
} Try / catch
if err != nil && strings.Contains(err.Error(), "conflicts with --uuid-list") {
// retry without --uuid-list or without --batch-size
} Prevention
- Choose either explicit UUIDs or batching, never both
- Strip --uuid-list from templates when batch-size is enabled
- Add a preflight check in automation that builds these command lines
When it happens
Trigger: Calling Execute/ApplySchema with both --batch-size greater than 1 and a non-empty --uuid-list.
Common situations: Operators extending an existing command line that already had --uuid-list by adding --batch-size; generated scripts that always supply UUID lists.
Related errors
- --batch-size requires 'direct' ddl_strategy
- --batch-size only allowed when all queries are CREATE TABLE|
- failed to load static auth plugin. Plugin configured but grp
- missing value for 'rate'
- missing value for 'path'
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/c801115a39d22027.
Report an issue: GitHub.