#4275·lancedb

bug(python): remote fetch_blobs fails above the server's 1024-row / 64 MiB request caps

Author: XuanwoCreated Sep 23, 2026Updated Sep 23, 2026
LabelsbugPython

Problem

On remote tables, fetch_blobs fails when a request has more than 1024 row ids or more than 64 MiB of blob bytes. Local tables have no such limits, so code that works locally breaks remotely on row count alone. A single blob over 64 MiB can never be read with fetch_blobs remotely.

python
# remote table with 1025 tiny blobs and one 65 MiB blob
t.fetch_blobs("payload", row_ids[:1024])   # OK
t.fetch_blobs("payload", row_ids[:1025])
# HttpError: 400 Bad Request: {"code":13,"error":"Bad request: fetch_blobs accepts at most 1024 row IDs"}
t.fetch_blobs("payload", [big_row_id])
# HttpError: 400 Bad Request: {"code":13,"error":"Bad request: fetch_blobs accepts at most 67108864 total blob bytes"}
t.fetch_blob_files("payload", [big_row_id])[0].read()   # works

The docstring only calls fetch_blobs "a convenience for small payloads" and doesn't mention either cap.

Root cause

The server caps each request at 1024 row ids and 64 MiB total. The client sends every row id in a single request (fetch_blobs_impl in rust/lancedb/src/remote/table/blobs.rs).

Fix direction

  • In the remote fetch_blobs_impl, split requests into chunks of at most 1024 row ids and concatenate the results in order.
  • For the byte cap, split using descriptor sizes and fall back to the Range route (fetch_blob_files) for single rows that exceed it, or agree with the server side on a streaming response without a total cap.
  • Document the caps. The bytes mode fix for #4247 depends on this, since it would materialize through fetch_blobs.

Environment

lancedb 0.40.0b5; lancedb server release-2026-09-20.39a433410f.verified. Same code on main.

Found during the Blob V2 bug bash (2026-09-23).