go-redis/redis · error
redis: Wait on a zero AutoFuture
Error message
redis: Wait on a zero AutoFuture
What it means
Error "redis: Wait on a zero AutoFuture" thrown in go-redis/redis.
Source
Thrown at autopipeline.go:1347
}
// No finish here: enqueue stamps ready under the stripe lock, before the
// command is visible to any drain (the error paths above still go through
// finish for uniform accessor behavior).
return AutoFuture{cmd: cmd, batch: ap.enqueue(cmd)}
}
// ErrSubmitBlockingFace rejects Submit on the blocking face: Submit does not
// wait, so a windowed caller could have several commands in flight at once —
// but the blocking face stripes its enqueue queue on the strength of every
// caller waiting per command, and a non-waiting window there can be reordered.
// The deferred face (AsyncAutoPipeline) is built for exactly that usage.
//
// EXPERIMENTAL: this API is subject to change, use with caution.
var ErrSubmitBlockingFace = errors.New(
"redis: Submit requires the deferred autopipeliner (AsyncAutoPipeline); on the blocking face use the typed methods or Do")
// errZeroAutoFuture is returned by Wait/WaitContext on a zero AutoFuture.
var errZeroAutoFuture = errors.New("redis: Wait on a zero AutoFuture")
// errDoNoArgs is returned by Do when called without a command.
var errDoNoArgs = errors.New("redis: AutoPipeliner.Do requires at least one argument")
// ErrAutoPipelineTimeout is set on drained commands when a flush could not
// obtain a batch permit within the engine's internal backstop — the engine is
// overloaded or an in-flight batch is wedged (e.g. read timeouts disabled on
// a dead peer). It is deliberately NOT context.DeadlineExceeded: the caller's
// own context did not expire, and errors.Is(err, context.DeadlineExceeded)
// must not fire for an internal engine timeout.
//
// EXPERIMENTAL: this API is subject to change, use with caution.
var ErrAutoPipelineTimeout = errors.New(
"redis: autopipeline: no batch permit within the internal backstop (engine overloaded or a batch is wedged)")
// Submit queues a command without blocking and returns an AutoFuture; Wait on
// it when the result is needed. This is the explicit form for working with raw
// Cmders on the deferred (async) face, where the typed methods (Set, Get, ...)View on GitHub (pinned to 36d97525cd)
Solutions
- Only call Wait on futures returned by Submit; a zero-value AutoFuture has no command attached
- Track submission errors from Submit and skip Wait for futures that were never enqueued
When it happens
Trigger: Thrown at autopipeline.go:1347 when the library encounters an invalid state.
Common situations: Treat AutoFuture as non-zero only after a successful Submit; defensively check the Submit error before storing futures.
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/ad848551f3e8ce10.json.
Report an issue: GitHub.