Repository navigation
Walk a hub row alone and reuse a walk for later pages in the Postgres store - #712
Conversation
|
@hydra-mira-review review |
Mira score 5/5 · 🟢 Good to merge
Reads involving highly connected rows avoid repeated batch splitting and reuse work across later pages in both SDKs. The Postgres stores remember rows needing isolated walks and cache recent walks, while first pages still refresh. How this PR works · 3 changes, 1 high risk, 1 medium risk, 1 low riskReads involving a heavily connected row repeat expensive walks, both while splitting batches and while paging through edges. This PR remembers rows whose walks were cut short and walks them alone on later reads. Both SDKs also cache eight adjacency reads for later pages, while refreshing every first page. 1. Walk previously cut rows alone on later reads · 🟠 medium risk ·
|
There was a problem hiding this comment.
Mira Review Summary
Both retrieval implementations use offset pagination, so the new cache does not serve continuation pages; Python also reloads all adjacent edges for each page (pg_hydradb.py). Cached relation pages can still be read after either store closes, and both new regression tests are skipped in CI (pgHydradbStore.test.ts).
Key Issues
| Issue | Location | |
|---|---|---|
| 🔴 | Both retrieval implementations use offset pagination, so the new cache never serves their continuation pages. | typescript/src/stores/pgHydradb.ts:746 |
| 🔴 | Both new regression tests are skipped by every CI test job. | typescript/test/pgHydradbStore.test.ts:185 |
3bcf814 to
456e4c0
Compare
|
@hydra-mira-review review |
456e4c0 to
cb3b0dc
Compare
|
@hydra-mira-review review |
cb3b0dc to
39fff15
Compare
|
@hydra-mira-review review |
39fff15 to
be64d0f
Compare
|
@hydra-mira-review review |
… store Signed-off-by: adityamishra-hydradb <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
be64d0f to
3556eeb
Compare
|
@hydra-mira-review review |
Summary
4/5 of #706. After pg_hydradb cuts a row's edges once, the Postgres store walks that row on its own, so it no longer cuts the rows walked with it or forces a split on every read.
The store also reuses its last walk when retrieval pages through the same edges. Both SDKs.
Implementation details
Door:
two-wayStore internals only; no API, id, or output change.
Cleanup:
noneWhat to delete:
Decisions
skip, orid_gtfor keyset reads). The store keeps the last 8 walks and serves a later page (skip > 0orid_gtset) from them; a first page always walks again, so each read still sees current rows. A cached cut read marks the result partial again, and a closed store raisesstore_closedbefore the cache is read.postgres. It builds pg_hydradb from a pinned hydradb commit and runs these gated tests of both SDKs on Postgres 16 and 17. No image goes to a registry.Validation
truncated. A neighbors read of the big company then walks it once per direction across all its pages, and a later page aftercloseraisesstore_closed. It fails without this change.precheck --base3/5: all checks passed, with a conformance warning: no result changes here, so there is no new conformance case.Limits
Linked issue
Closes #706
AI Assistance
Checklist
/approved.AGENTS.md).Breaking changes
None.
🤖 Generated with Claude Code