Repository navigation
fix(memory): retain cgroup pressure after allocator trim - #2851
Merged
Merged
Conversation
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
5 of 7 tasks
This was referenced Oct 2, 2026
4 of 6 tasks
This was referenced Oct 2, 2026
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
Supersedes #2596 (
agent/master-unpushed-20260928). That pull request is left open.Noneas room to keep allocating.Motivation
#2596 conflicted with current master and its six Linux Hauler lanes failed against its pinned base. Diffed against current master first:
sampled_process_resident_bytes_v1()(unreclaimable RSS) after a trim, so cgroup pressure is still dropped.Changes
register_process_allocator_pressure_reclaimer_v1re-reads throughsample_for_checkpointafter the trim instead ofpublish_post_reclaim_observed_resident_bytes.sample_for_checkpointreturnsResidentMemoryPressureStateV1. A failed sample leaves the last published verdict in place. Checkpoint and graph-publication callers use that verdict.artifact/delta.rs), the source restriction that fed it, andrestart_after_sigterm_rebuilds_only_changed_files. That test asserted the withdrawn optimization (only the edited file is rebuilt).wait_for_refresh_in_flightexisted only for it. Unchanged files stay searchable because the successor build is a full text artifact. Existing carried staging files fail layout verification and are rebuilt.Test plan
cargo fmt --all -- --check— exit 0cargo clippy -p tracedecay-runtime-core -p tracedecay-application -p tracedecay-store-runtime -p tracedecay-code-index -p tracedecay-query -p tracedecay-code-index-runtime --all-targets -- -D warnings— exit 0cargo clippy -p tracedecay --test daemon_suite --features test-helpers -- -D warnings— exit 0cargo test -p tracedecay-runtime-core --lib resident_memory— 51 passedcargo test -p tracedecay-application --lib code_index::— 2 passed (checkpoint_sampling_failure_preserves_known_pressure,a_checkpoint_stops_at_the_watermark_without_reclaiming)cargo test -p tracedecay-store-runtime --lib resident_memory_trip_is_permanent_for_one_publication_attempt— 1 passedcargo test -p tracedecay-query --lib— 275 passed, 1 ignoredcargo test -p tracedecay-code-index --lib— 270 passedcargo test -p tracedecay-code-index-runtime --lib— 562 passed, 1 ignoredcargo test -p tracedecay-code-index-runtime --lib staging_sidecar_tests— 1 passedcargo test -p tracedecay-code-index-retention --lib staging_sidecars_share_their_staging_artifact_liveness— 1 passedcargo test -p tracedecay-code-index --lib lexical_page— 12 passedcargo nextest run --workspace --no-fail-fastnot runsample_for_checkpointis an in-workspace signature change and every caller is updatedbounded_restore_refuses_a_same_inode_rewrite_witnessfailed once inside the first fulltracedecay-querylib run and did not reproduce across eight consecutive reruns of that suite. The test and the restore witness path are unchanged from master; the assertion is stillCorrupt.