Skip to content

BE-847: atlas: store hydration and the generation runtime - #9711

Open
indietyp wants to merge 3 commits into
bm/be-846-atlas-delta-feed-placement-and-projectorfrom
bm/be-847-atlas-store-hydration-and-the-generation-runtime
Open

indietyp wants to merge 3 commits into
bm/be-846-atlas-delta-feed-placement-and-projectorfrom
bm/be-847-atlas-store-hydration-and-the-generation-runtime

Conversation

@indietyp

@indietyp indietyp commented Sep 14, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Add the store boundary and the generation runtime. Hydration is the one place the serving layer asks Postgres for anything, and it sits behind resolver traits with the SQL statements pinned as snapshots, so the tree states what the process asks the store. The runtime is what makes more than one generation servable per process: a manager opens, promotes, retires and unlinks generations on a poll loop the host runs as its own task, and a registry answers a request with the present generation and the requested one together.

The module stays dead code under the lib.rs attribute until the read API consumes it (BE-815).

For review, the properties this stands on:

  • A request sees one coherent pair of generation and delta publication for its whole life, taken under a single read lock at admission (UniverseRegistry::observe returns an Observation).
  • Promotion never loses the last good publication. An opening failure or a feed that ends keeps what stood in service and retries at the poll cadence.
  • Admission enforces retention on its own, independent of cleanup: the registry refuses a request for an expired generation even when its directory still exists, with retention timed from the replacement's promotion.
  • Shutdown stops every feed before joining any, and removal never waits on a request that still holds a world.
  • The tree pins what the process asks Postgres: the statements are snapshots under serve/hydrate/snapshots/.

🔍 What does this change?

  • serve/hydrate/: GraphDatabaseClient, the LocateResolver and TypeUrlResolver traits with a cached type-URL resolver, the locate and visibility queries, the scalar and column readers, and the statement snapshots.
  • serve/runtime/manager/: GenerationManager with ManagerOptions and FeedOptions; open, promote, retire, unlink and shutdown on the poll loop.
  • serve/runtime/registry/: UniverseRegistry, Universe (a World with the Epoch captured for the request) and Observation.
  • serve/runtime/: Runtime, RuntimeSource and its handle, which the host holds.

❓ How to test this?

  1. cargo nextest run -p hash-graph-atlas --all-features serve::runtime:: runs the manager and registry tests.
  2. cargo nextest run -p hash-graph-atlas --all-features serve::hydrate:: runs the statement snapshot tests, where a changed statement shows as a snapshot diff.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Sep 16, 2026 3:54pm UTC
petrinaut Ready Ready Preview Sep 16, 2026 3:54pm UTC
petrinaut-docs Ready Ready Preview Sep 16, 2026 3:54pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 16, 2026 3:54pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 14, 2026 13:40 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 14, 2026 13:40 Inactive
@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels Sep 14, 2026
@indietyp
indietyp deployed to pull-request September 14, 2026 13:41 — with GitHub Actions Active
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
Comment thread libs/@local/graph/atlas/src/serve/hydrate/mod.rs Fixed
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.63477% with 293 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.19%. Comparing base (658466c) to head (3ce9378).

Files with missing lines Patch % Lines
...ibs/@local/graph/atlas/src/serve/hydrate/client.rs 60.64% 84 Missing and 1 partial ⚠️
...@local/graph/atlas/src/serve/hydrate/statements.rs 76.96% 41 Missing ⚠️
...ibs/@local/graph/atlas/src/serve/hydrate/scalar.rs 64.89% 31 Missing and 2 partials ⚠️
...@local/graph/atlas/src/serve/hydrate/visibility.rs 65.38% 26 Missing and 1 partial ⚠️
...local/graph/atlas/src/serve/runtime/manager/mod.rs 84.02% 18 Missing and 9 partials ⚠️
...ocal/graph/atlas/src/serve/runtime/manager/slot.rs 83.33% 15 Missing and 4 partials ⚠️
...ibs/@local/graph/atlas/src/serve/hydrate/locate.rs 0.00% 18 Missing ⚠️
...cal/graph/atlas/src/serve/runtime/manager/error.rs 0.00% 9 Missing ⚠️
...al/graph/atlas/src/serve/runtime/manager/source.rs 84.31% 8 Missing ⚠️
libs/@local/graph/atlas/src/serve/runtime/mod.rs 89.47% 8 Missing ⚠️
... and 3 more
Additional details and impacted files
@@                                  Coverage Diff                                   @@
##           bm/be-846-atlas-delta-feed-placement-and-projector    #9711      +/-   ##
======================================================================================
+ Coverage                                               65.67%   66.19%   +0.52%     
======================================================================================
  Files                                                    1719     1775      +56     
  Lines                                                  181922   188651    +6729     
  Branches                                                 7501     7798     +297     
======================================================================================
+ Hits                                                   119475   124880    +5405     
- Misses                                                  61038    62275    +1237     
- Partials                                                 1409     1496      +87     
Flag Coverage Δ
apps.hash-graph 13.62% <ø> (ø)
rust.hash-graph-atlas 80.86% <76.63%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@indietyp
indietyp added this pull request to stack #9714 September 14, 2026 13:56
@indietyp indietyp self-assigned this Sep 14, 2026
@indietyp indietyp changed the title feat: add atlas store hydration and the generation runtime BE-847: atlas: store hydration and the generation runtime Sep 14, 2026
@indietyp
indietyp force-pushed the bm/be-847-atlas-store-hydration-and-the-generation-runtime branch from bc04f83 to 6da9369 Compare September 14, 2026 14:44
@indietyp
indietyp force-pushed the bm/be-847-atlas-store-hydration-and-the-generation-runtime branch from 6da9369 to fdba1e1 Compare September 14, 2026 15:39
@indietyp
indietyp force-pushed the bm/be-847-atlas-store-hydration-and-the-generation-runtime branch from fdba1e1 to 6c44163 Compare September 14, 2026 15:55
@indietyp
indietyp marked this pull request as ready for review September 14, 2026 15:58
Copilot AI balanced review requested due to automatic review settings September 14, 2026 15:58
@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Adds security-sensitive store reads (property masking, visibility policy queries) and generation admission logic that controls which world/epoch requests see; mitigated by trait boundaries, snapshot SQL tests, and extensive manager/registry tests.

Overview
Introduces the Postgres boundary for request-time graph detail and a multi-generation runtime so one process can open, promote, retain, and retire fitted generations while serving coherent publications.

Hydration (serve/hydrate/) fills locate and edges trailers from the live store: direct-type URLs, capped scalar properties, and actor-masked reads via PropertyProtectionFilter / VisibilityActor. GraphDatabaseClient implements LocateResolver and TypeUrlResolver (with optional caching), compiles reads through SelectCompiler, and runs async I/O from blocking callers via runtime.block_on. visibility_proof resolves which layout/topology rows an actor may see under merged ViewEntity policies before scene assembly. Compiled SQL is snapshot-tested (bare vs masked property subqueries).

Runtime (serve/runtime/) adds Runtime (world + DeltaReader, optional delta feed with graceful shutdown), GenerationManager (poll loop: current pointer, slot state machine, promotion, retention expiry, optional unlink), and UniverseRegistry so admission returns an Observation pairing present and requested generations under one read lock, with time-bounded access to retired generations.

Module docs in serve/mod.rs are updated to describe observation-based reads and retained-generation admission. The tree remains internal until the read API wires it in (BE-815).

Reviewed by Cursor Bugbot for commit 3ce9378. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$25.7 \mathrm{ms} \pm 174 \mathrm{μs}\left({\color{gray}-0.364 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.43 \mathrm{ms} \pm 20.0 \mathrm{μs}\left({\color{gray}0.223 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$12.4 \mathrm{ms} \pm 123 \mathrm{μs}\left({\color{gray}1.28 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.5 \mathrm{ms} \pm 375 \mathrm{μs}\left({\color{gray}-0.780 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.4 \mathrm{ms} \pm 103 \mathrm{μs}\left({\color{gray}-0.005 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$23.8 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}0.104 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.4 \mathrm{ms} \pm 211 \mathrm{μs}\left({\color{gray}-1.209 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.75 \mathrm{ms} \pm 25.0 \mathrm{μs}\left({\color{gray}0.779 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.3 \mathrm{ms} \pm 119 \mathrm{μs}\left({\color{gray}0.183 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.74 \mathrm{ms} \pm 24.2 \mathrm{μs}\left({\color{gray}0.382 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}1.24 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.40 \mathrm{ms} \pm 20.8 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.17 \mathrm{ms} \pm 29.7 \mathrm{μs}\left({\color{gray}1.05 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.66 \mathrm{ms} \pm 31.2 \mathrm{μs}\left({\color{gray}3.03 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.19 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}1.64 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.41 \mathrm{ms} \pm 31.5 \mathrm{μs}\left({\color{gray}0.730 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.42 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}-0.678 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.17 \mathrm{ms} \pm 27.7 \mathrm{μs}\left({\color{gray}1.77 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.74 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}0.574 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}0.002 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.80 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}-0.379 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.07 \mathrm{ms} \pm 22.1 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.85 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-2.233 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.18 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}0.802 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.10 \mathrm{ms} \pm 23.4 \mathrm{μs}\left({\color{gray}0.824 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.79 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$2.97 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}1.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.47 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}0.967 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.08 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}0.630 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.31 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}0.194 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.45 \mathrm{ms} \pm 23.3 \mathrm{μs}\left({\color{gray}1.45 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.06 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{gray}0.554 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.36 \mathrm{ms} \pm 23.8 \mathrm{μs}\left({\color{gray}1.23 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$31.3 \mathrm{ms} \pm 169 \mathrm{μs}\left({\color{gray}-0.365 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$67.9 \mathrm{ms} \pm 411 \mathrm{μs}\left({\color{gray}0.911 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$35.6 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}3.18 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$37.4 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}-0.880 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$41.7 \mathrm{ms} \pm 242 \mathrm{μs}\left({\color{gray}0.291 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$32.9 \mathrm{ms} \pm 162 \mathrm{μs}\left({\color{gray}-0.719 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$394 \mathrm{ms} \pm 1.04 \mathrm{ms}\left({\color{gray}1.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$90.4 \mathrm{ms} \pm 552 \mathrm{μs}\left({\color{gray}4.15 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$70.0 \mathrm{ms} \pm 375 \mathrm{μs}\left({\color{gray}0.756 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$275 \mathrm{ms} \pm 946 \mathrm{μs}\left({\color{gray}3.19 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.4 \mathrm{ms} \pm 73.6 \mathrm{μs}\left({\color{gray}2.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.6 \mathrm{ms} \pm 73.9 \mathrm{μs}\left({\color{gray}3.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.6 \mathrm{ms} \pm 61.5 \mathrm{μs}\left({\color{gray}0.924 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.5 \mathrm{ms} \pm 60.1 \mathrm{μs}\left({\color{gray}2.42 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.5 \mathrm{ms} \pm 59.9 \mathrm{μs}\left({\color{gray}2.00 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.5 \mathrm{ms} \pm 74.0 \mathrm{μs}\left({\color{gray}3.83 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.2 \mathrm{ms} \pm 72.4 \mathrm{μs}\left({\color{gray}0.289 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.3 \mathrm{ms} \pm 66.0 \mathrm{μs}\left({\color{gray}0.027 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.5 \mathrm{ms} \pm 99.0 \mathrm{μs}\left({\color{gray}3.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$10.8 \mathrm{ms} \pm 71.2 \mathrm{μs}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$10.7 \mathrm{ms} \pm 59.1 \mathrm{μs}\left({\color{gray}1.88 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$11.0 \mathrm{ms} \pm 109 \mathrm{μs}\left({\color{gray}3.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$10.6 \mathrm{ms} \pm 68.9 \mathrm{μs}\left({\color{gray}0.929 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$10.7 \mathrm{ms} \pm 66.8 \mathrm{μs}\left({\color{gray}2.39 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$10.6 \mathrm{ms} \pm 60.8 \mathrm{μs}\left({\color{gray}0.158 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.0 \mathrm{ms} \pm 105 \mathrm{μs}\left({\color{gray}3.48 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$10.7 \mathrm{ms} \pm 84.0 \mathrm{μs}\left({\color{gray}1.98 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$10.6 \mathrm{ms} \pm 57.1 \mathrm{μs}\left({\color{gray}-1.082 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$10.7 \mathrm{ms} \pm 56.4 \mathrm{μs}\left({\color{gray}1.10 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$7.89 \mathrm{ms} \pm 50.6 \mathrm{μs}\left({\color{gray}0.956 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$55.5 \mathrm{ms} \pm 465 \mathrm{μs}\left({\color{gray}-0.381 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$107 \mathrm{ms} \pm 579 \mathrm{μs}\left({\color{gray}1.36 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$62.6 \mathrm{ms} \pm 382 \mathrm{μs}\left({\color{gray}1.22 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$71.7 \mathrm{ms} \pm 507 \mathrm{μs}\left({\color{gray}2.36 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$80.8 \mathrm{ms} \pm 457 \mathrm{μs}\left({\color{gray}2.26 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$87.1 \mathrm{ms} \pm 547 \mathrm{μs}\left({\color{gray}1.51 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$45.4 \mathrm{ms} \pm 396 \mathrm{μs}\left({\color{gray}2.38 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$71.1 \mathrm{ms} \pm 431 \mathrm{μs}\left({\color{gray}0.035 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$51.6 \mathrm{ms} \pm 403 \mathrm{μs}\left({\color{gray}2.28 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$60.7 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{gray}3.40 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$61.8 \mathrm{ms} \pm 458 \mathrm{μs}\left({\color{gray}0.905 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$61.1 \mathrm{ms} \pm 538 \mathrm{μs}\left({\color{gray}-0.897 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$118 \mathrm{ms} \pm 554 \mathrm{μs}\left({\color{gray}2.74 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$130 \mathrm{ms} \pm 532 \mathrm{μs}\left({\color{gray}4.27 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$18.2 \mathrm{ms} \pm 251 \mathrm{μs}\left({\color{lightgreen}-20.002 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$521 \mathrm{ms} \pm 1.02 \mathrm{ms}\left({\color{gray}2.75 \mathrm{\%}}\right) $$ Flame Graph

libs/@local/graph/atlas/src/serve/hydrate/client.rs: Move repeated
trait-method docs to the struct, clarify execution model and panic
conditions.

libs/@local/graph/atlas/src/serve/hydrate/locate.rs: Clarify error
handling semantics—partial population and reset requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

4 participants