Skip to content

perf(storage): route node label mutations by surrogate - #1843

Merged
DecisionNerd merged 3 commits into
mainfrom
perf/1809-target-node-label-mutations
Oct 5, 2026
Merged

DecisionNerd merged 3 commits into
mainfrom
perf/1809-target-node-label-mutations

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1809

Change

Persisted node label mutations now retain the authenticated node_id from the target row and pass those immutable routes into storage. Storage decodes only the candidate range shards (plus the legacy flat node participant); UUID-only callers without routes keep the conservative scan. Candidate payloads still receive the existing validation and changed immutable fragments are rewritten normally. The merge with current main preserves label membership accounting, label ordering/deduplication, pending-node behavior, lifecycle scopes, and publication atomicity.

Added a storage regression that corrupts the routed candidate, verifies mutation refuses it before staging, and restores the fixture bytes. Strengthened the Rust facade test to assert the added label is visible while a previously opened reader still sees its original snapshot. At two bounded topology sizes it asserts identical fragment-read, decoded-row, and rebuilt-label counters for target SET and REMOVE, then checks the reopened project. Last-label-removal publication failure still preserves the prior generation.

Validation

The public facade regression uses 2 and 12 unrelated nodes. At both sizes, SET records fragment-read / decoded-row / rebuilt-label counters (2, 2, 2) and REMOVE records (2, 2, 3); it also checks reopen and retained-reader behavior.

  • GF_TEST_TMPDIR=/home/ubuntu/.cache/gf-1809-tmp TMPDIR=/home/ubuntu/.cache/gf-1809-tmp CARGO_BUILD_JOBS=1 CARGO_TARGET_DIR=/home/ubuntu/.cache/graphforge-target-1809-final make test-rust ARGS="-p graphforge-api" — 1,584 passed, 11 skipped, 11 slow.
  • GF_TEST_TMPDIR=/home/ubuntu/.cache/gf-1809-tmp TMPDIR=/home/ubuntu/.cache/gf-1809-tmp CARGO_BUILD_JOBS=1 CARGO_TARGET_DIR=/home/ubuntu/.cache/graphforge-target-1809-final make test-rust ARGS="-p graphforge-exec" — 1,008 passed, 16 skipped.
  • GF_TEST_TMPDIR=/home/ubuntu/.cache/gf-1809-tmp TMPDIR=/home/ubuntu/.cache/gf-1809-tmp CARGO_BUILD_JOBS=1 CARGO_TARGET_DIR=/home/ubuntu/.cache/graphforge-target-1809-final make test-rust ARGS="-p graphforge-storage" — 1,682 passed, 9 skipped.
  • GF_TEST_TMPDIR=/home/ubuntu/.cache/gf-1809-tmp TMPDIR=/home/ubuntu/.cache/gf-1809-tmp CARGO_BUILD_JOBS=1 CARGO_TARGET_DIR=/home/ubuntu/.cache/graphforge-target-1809-final python3 scripts/test_environment.py -- cargo test --locked -p graphforge-exec --lib write_driver::mutation_phases::tests::label_phase_routes_pending_cancellation_and_deleted_entities — 1 passed.
  • GF_TEST_TMPDIR=/home/ubuntu/.cache/gf-1809-tmp TMPDIR=/home/ubuntu/.cache/gf-1809-tmp CARGO_BUILD_JOBS=1 CARGO_TARGET_DIR=/home/ubuntu/.cache/graphforge-target-1809-final make check — passed.
  • git diff --check origin/main...HEAD — passed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: CurateLabs/graphforge/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f702a096-7b6b-443b-b56f-98426a05a0ea

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions github-actions Bot added executor Changes to query executor core Core source code changes documentation Improvements or additions to documentation labels Oct 5, 2026
@DecisionNerd
DecisionNerd force-pushed the perf/1809-target-node-label-mutations branch from 3d25b31 to 78d5d88 Compare October 5, 2026 18:10
@DecisionNerd
DecisionNerd added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit f5b9481 Oct 5, 2026
16 checks passed
@DecisionNerd
DecisionNerd deleted the perf/1809-target-node-label-mutations branch October 5, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core source code changes documentation Improvements or additions to documentation executor Changes to query executor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(storage): target node label mutations to affected fragments

1 participant