Skip to content

feat: batch generic row lookups across base and WAL - #302

Merged
beinan merged 5 commits into
mainfrom
codex/batch-get
Oct 4, 2026
Merged

beinan merged 5 commits into
mainfrom
codex/batch-get

Conversation

@beinan

@beinan beinan commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Adds GenericStore::get_many, the shared Rust trait/facade/client API, and POST /api/v1/generic/{name}/get-rows. Read up to 1,024 IDs together or project only id for deduplication; missing IDs are omitted and repeated IDs returned once in first-requested order.

Lance 9 serializes disk lookups for bare PK-IN queries. A documented zero-offset compatibility adapter selects its general indexed LSM scan, retaining flushed-WAL/newest-key semantics. Reads reuse merge-consistency retries and avoid source-local limits that could underfill results. A known Lance 9 WAL membership-index error retries native point lookups against the same captured view after discarding partial results. That compatibility path is slower; other errors still propagate. No dependencies are added or upgraded. Remove unused lance-graph and lancedb dependencies from core; the former pulled a second Lance/DataFusion stack, legacy TLS/JWT dependencies, and Thrift into consumers of the batch API.

Validation: 22 core and 10 HTTP route tests pass, including a live Rust-client round trip, a single-index-plan regression, WAL overwrites, base deletions, projections, and concurrent merges. Clippy passes for all affected crates/targets.

Local ARM64 debug benchmarks, five warm samples, 512 IDs:

  • Private 721-row conversation fixture: full-row P50 3,703.85 → 42.35 ms; ID-only 18.87 ms.
  • Synthetic base + two pending WAL generations: full-row P50 7,892.15 → 49.42 ms.

Every response matched expected rows. These are local warm-cache query measurements, not Blob or ingestion throughput. The PR includes a reproducible synthetic benchmark and methodology/results in docs/benchmarks/batch-get.md; private data is not included.

@beinan
beinan marked this pull request as ready for review October 4, 2026 04:04
@beinan
beinan marked this pull request as draft October 4, 2026 04:31
@beinan
beinan marked this pull request as ready for review October 4, 2026 04:47
@beinan
beinan merged commit 759a35b into main Oct 4, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant