Skip to content

[Medium] Qdrant snapshot creation times out under the client's default 5s deadline #371

Description

@gnanirahulnutakki

Summary

QdrantMemoryRuntime::create_snapshot / snapshot_into_receipt fail against a live Qdrant with a client-side deadline:

create_snapshot: Error in the response: The operation was cancelled Timeout expired

Surfaced while making the gated Qdrant integration tests actually run (#358, PR #370): integration::snapshot_into_receipt_records_event now executes and fails, whereas the other durable/hybrid scenarios pass.

Root cause

qdrant-client's QdrantConfig default request timeout is 5s (qdrant-client-1.18.0/src/qdrant_client/config.rs:224). connect() builds the client with Qdrant::from_url(&config.url) and never overrides it, so the blocking gRPC CreateSnapshot inherits a 5s deadline. Snapshot creation legitimately exceeds that (it flushes segments/WAL to disk); the REST snapshot endpoint on the same collection returns in ~1s, so this is a client-deadline problem, not server/disk slowness.

Impact

The durable Qdrant backend's snapshot feature (used by snapshot_into_receipt) is unusable on any setup where snapshot creation exceeds 5s. Distinct from #348/#349 (recall re-entry / async drop) — different trigger, different fix.

Suggested fix

Give snapshot operations a longer deadline without lengthening the recall fail-fast: either build a dedicated snapshot client with a generous .timeout(..), or make the request timeout configurable (QDRANT_TIMEOUT_SECS) and set snapshot ops explicitly. Then drop the --skip snapshot_into_receipt_records_event from the qdrant-integration CI job added in PR #370 so the test is exercised.

Repro

docker run -p 6334:6334 qdrant/qdrant:v1.18.0
QDRANT_INTEGRATION_TEST=1 QDRANT_URL=http://localhost:6334 \
  cargo test -p ardur-memory-qdrant --test integration \
  snapshot_into_receipt_records_event -- --ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomp:memoryMemory / Qdrant backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions