quickwit-oss/quickwit · error · anyhow::Error
initial visibility deadline insufficient
Error message
initial visibility deadline insufficient
What it means
The queue-based source's visibility task extends message visibility deadlines so long batches aren't redelivered. In `initialize`, if the first computed extension is zero (i.e. no positive visibility window can be scheduled), the task fails because waiting any amount of time would let the queue redeliver in-flight messages. It guards against a misconfigured or unsupported visibility timeout.
Source
Thrown at quickwit/quickwit-indexing/src/source/queue_sources/visibility.rs:163
.ask_for_res(RequestLastExtension)
.await
.map_err(|e| anyhow!(e))?;
Ok(())
}
}
#[async_trait]
impl Actor for VisibilityTask {
type ObservableState = JsonValue;
fn name(&self) -> String {
"QueueVisibilityTask".to_string()
}
async fn initialize(&mut self, ctx: &ActorContext<Self>) -> Result<(), ActorExitStatus> {
let first_extension = self.next_extension();
if first_extension.is_zero() {
return Err(anyhow!("initial visibility deadline insufficient").into());
}
ctx.schedule_self_msg(first_extension, Loop);
Ok(())
}
fn yield_after_each_message(&self) -> bool {
false
}
fn observable_state(&self) -> Self::ObservableState {
json!({
"ack_id": self.ack_id,
"extension_count": self.extension_count,
})
}
}
#[derive(Debug)]View on GitHub (pinned to a39730c5cd)
Solutions
- Increase the queue's visibility timeout in the quickwit config so it exceeds the minimum extension interval.
- Review the queue source configuration (e.g. `visibility_timeout` under queue settings) and set a sane value (several minutes for heavy batches).
- If the default was overridden in config, restore the documented default value.
Example fix
// before (config) queues: visibility_timeout: 0s // after (config) queues: visibility_timeout: 600s
Defensive patterns
Strategy: validation
Validate before calling
let visibility_timeout = cfg.queues.visibility_timeout;
if visibility_timeout.is_zero() {
return Err(anyhow!("queue visibility_timeout must be > 0"));
} Prevention
- Always configure a positive visibility timeout (several minutes for large batches).
- Validate queue config at startup, before the visibility task is spawned.
- Avoid overriding default queue settings without reading the documented minimums.
When it happens
Trigger: `self.next_extension()` returns Duration::ZERO at startup — meaning the queue's configured visibility timeout is zero or too small to be extended, so the task cannot schedule its first `Loop` message.
Common situations: Queue configured with visibility_timeout of 0 or a value below the minimum extension interval; misconfigured quickwit queue settings (e.g. `default_queue` visibility timeout) in the node config.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- ack_id {} not found in in-flight
- err.to_string()
- Facet are not supported in quickwit yet.
- index ID pattern `{pattern}` is invalid: patterns must not c
- index ID pattern `{pattern}` is invalid: an index ID must ha
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/ffe3e754928fe9d9.
Report an issue: GitHub.