perf: clean-close fast path (skip full LPG serialize) - #3
Open
jarmen423 wants to merge 3 commits into
Open
Conversation
Close previously always used FlushReason::Explicit, which re-serializes every section even when ephemeral wrappers are clean. Prefer dirty-only Checkpoint when the session has no WAL records and no forced flush, preserving Explicit for mutations, WAL-off, and recovery.
Ignored GRAFEO_CLOSE_BENCH_PATH harness under /data/tmp only; document before/after am-personal clean-close wall (~26s → ~0.13s).
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.
Summary
Clean no-write
GrafeoDB::close()no longer forcesFlushReason::Explicitfull LPG serialize (root cause of ~137.6s sidecar close CPU).Uses dirty-only
Checkpointwhen WAL is enabled,record_count()==0, and no recovery/index DDL flush flag.Separate from diagnostics PR #2 (
diagnostics/close-forensics).Head:
166e3c200ba145fc637bbc6b197f318b0c6ba944Base:
agent/txn-session-batch-20260726(9781320f)Correctness
clean_close_does_not_advance_checkpoint_iterationdirty_close_persists_and_advances_iterationwal_recovery_forces_checkpoint_on_closeTest plan
docs/TRACK_C_CLOSE_FAST_PATH.mdMade with Cursor