Repository navigation
test(generator): pin that INC_RECURSE slices an already-materialised list - #7611
Merged
Merged
Conversation
…list
The INC_RECURSE segment machinery is live on the sender: the generator
pushes each sub-list onto `ndx_segments` as it ships it and
`reclaim_oldest_segment` runs from the transfer loop. What is absent is
upstream's lazy scan. `send_directory` / `send1extra` scan ONE directory
and emit ONE segment under `send_extra_file_list(f, at_least)`, so the
whole tree is never resident. oc calls `build_file_list` first and slices
the finished list afterwards, so peak residency is taken before the first
segment ships - and no downstream reclaim can lower a peak already reached.
Nothing pinned that ordering. The two existing reclaim tests hand-assign
`ndx_segments`, so they prove the mechanism given >=2 segments and say
nothing about what production builds. This test records the current shape
against a 3-directory / 6-file source:
- all 10 entries (`.` + 3 dirs + 6 files) are resident before
partitioning, which is the assertion the lazy producer must move
- partitioning yields exactly 3 sub-segments, one per directory - the
same granularity `send_directory` emits, reached by slicing rather
than by scanning
Both assertions discriminate. Dropping `recursive` from the config gives
built=4 / resident=0 and the first assertion fails; short-circuiting
`partition_file_list_for_inc_recurse` gives 0 segments and the second
fails.
This was referenced Sep 1, 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.
What
Adds one test pinning the ordering that makes INC_RECURSE's segment machinery
unable to bound sender-side flist residency.
Why
The segment machinery is live. The generator pushes each sub-list onto
ndx_segmentsas it ships it (generator/protocol_io.rs, citingflist.c:2966), andreclaim_oldest_segmentruns from the transfer loop. Whatis absent is upstream's lazy scan:
send_directory/send1extrascan ONEdirectory and emit ONE segment under
send_extra_file_list(f, at_least), sothe whole tree is never resident.
oc calls
build_file_listfirst and slices the finished list afterwards(
partition_file_list_for_inc_recurse). Peak residency is therefore takenbefore the first segment ships, and no amount of downstream reclaim can lower
a peak already reached.
Nothing pinned that. The two existing reclaim tests hand-assign
ctx.incremental.ndx_segments, so they prove the mechanism given at least twosegments and say nothing about what production actually builds.
What the test records
Against a 3-directory / 6-file source:
.+ 3 dirs + 6 files) are resident before partitioning -this is the assertion the lazy producer has to move
granularity
send_directoryemits, reached by slicing rather than scanningNon-vacuity
Both assertions discriminate, measured:
recursivefrom the config givesbuilt=4/resident_files=0(only
.plus the three top-level dirs - the scan never descends) and thefirst assertion fails
partition_file_list_for_inc_recursegives 0 segments:left: 0, right: 3, and the second assertion failsTest-only; no production code is touched.
cargo fmt --all -- --checkclean;cargo nextest run -p transfer generator::424/424.