Repository navigation
feat(ladybug-graph): register real engine partition-routing hooks - #2
Merged
Merged
Conversation
…rtitioning Store one partition subgraph per community via PARTITION BY LIST(cluster) instead of HASH(server). Each vertex starts as its own community and WCC improvements physically migrate rows with delete + insert (move_vertex_to_cluster), since the engine refuses in-place partition-key updates. The Edge rel table is declared after seeding so rel coverage includes every initial cluster, and PartitionRouter discovers the engine's value-to-partition map from the catalog. Msg stays HASH-partitioned by compute shard.
Point the example at a local ladybug-rust checkout carrying the RoutingGuard bindings and install real hooks: the server binary and standalone demo register all-local hooks with lifecycle logging before opening the store, and a new tests/routing.rs target proves the full remote loop (claim a dedicated HASH table, point + COPY writes served from the bundled row store, ordered parent scans, create/drop lifecycle) through the engine over ADBC. PartitionRouter stays as the client-side discovery complement; direct reads of claimed partitions are engine-rejected (parent scans only). Teardown joins the server thread before removing the temp dir, which shutdown checkpointing requires once partitions are claimed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires the example up to the real distributed hooks via
lbug::RoutingGuard(LadybugDB/ladybug-rust#40, now merged), replacing the client-side-only story.What
examples/ladybug-graph/Cargo.toml:lbugtracks ladybug-rust main via git (pinned past [SVC-2367] Remove salt-key for deleted servers rivet-dev/rivet#40) until a crates.io release carriesRoutingGuard— flips to a version req in ladybug-graph: switch lbug back to a version dependency after hooks release #3. No sibling checkout assumed, so plain GitHub runners can build it.ladybug_server.rs: newinstall_local_hooks()installing all-local hooks with lifecycle logging. Held for process lifetime inbin/ladybug-server.rsand the standalone demo.tests/routing.rs(new target, own process since hooks are process-global): claims a dedicatedRemoteHASH table, proves point +COPYwrites served from the bundled row store, ordered parent-union reads, and 3x create/drop lifecycle — all through the engine over ADBC.partitioning.rsheader, README). NoLBUG_LIBRARY_DIR/LBUG_INCLUDE_DIRoverlay: shipped prebuilts carry the hooks since Ship partition routing hooks in the amalgamated lbug.hpp LadybugDB/ladybug#1005 (also merged)..github/workflows/rust.yml:checkruns onubuntu-latest(no depot runners on this fork) and resolvesLBUG_PRECOMPILED_RUN_IDfrom the latest successful LadybugDB/ladybug main build, mirroring ladybug-rust's CI. Also fixes two pre-existinguniversaldbladybug-driver compile errors the check surfaced (approximate_sizestub,MaxRetriesReachedpayload) pluscargo fmtdiffs.Verification
Full suite green (4 lib + 11 kcore + 1 routing + 1 doctest) against the git
lbugwith plain prebuilt download (post-rivet-dev#1005 run);cargo fmt --all -- --checkclean;cargo check --workspace --exclude rivetkit-wasm(with CI's deny-warnings flags) green.Notes for reviewers
Remote_p<i>) are rejected by the engine (no local storage; only parent scans route viabindScan) — asserted as a comment, not a test. Tracked in ladybug-graph: direct reads of claimed partitions are engine-rejected #5.FileInfo::truncate). The pre-existingkcore.rsharness has the same latent order — tracked in ladybug-graph: fix TestServer drop order in kcore.rs #4.