Repository navigation
perf(graph): reuse bounded handles across interleaved pages - #4725
Draft
ScriptedAlchemy wants to merge 2 commits into
Draft
ScriptedAlchemy wants to merge 2 commits into
ScriptedAlchemy wants to merge 2 commits into
Conversation
Keep up to eight authenticated segment handles alive during a graph publication pass. Alternating segment page reads no longer incur a fresh file open, while evicted entries are re-opened and revalidated. Exercise alternating reads, handle bounds, eviction, and refused out-of-range reads. Refs #4532.
|
Apply the exact rustfmt line break required by the repository-gate failure on the new LRU lookup; preserve its behavior and regressions.
This branch has not been deployed
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.
Root cause
Refs #4532. The current sealed graph reader already pins the last segment, avoiding a new
open()for consecutive pages from the same file. However, it drops that handle when a different segment is encountered. An interleavedA, B, A, Bpage sequence therefore reopens a segment on every switch, which is expensive on the reported endpoint-scanned macOS machines.Focused change
Regression coverage
with_verified_segmentspath, alternates six page reads, verifies returned content/digests, and requires 2 opens rather than 6.Validation
Reviewed the exact one-file GitHub diff against
masterat65ddc060(133 added, 11 removed) and checked source structure, whitespace and final newline. Rust compilation, rustfmt and the two new tests have not run: this execution environment has no supplied checkout or Bazel/Rust toolchain. Hosted CI must run the isolated branch throughbazel test //crates/tracedecay-store-runtime:unit_test --test_output=errorsand the graph publication journey before merge. No measured wall-time or CPU improvement is claimed.Remaining acceptance
This is a focused remaining reopen case, not a substitute for the issue's required before/after graph-publication timing and file-open measurements on the reported 6.6k-file macOS endpoint-security setup. The existing contiguous page reader already opens one handle per segment. Keep #4532 open until the actual production journey is verified. This PR is independent of the graph rewarm PR #4709; PR repair/CI/merges remain owned by the separate PR automation.