The ensure_index_fresh wrappers rebuild with the default checkpoint size, not the caller's
Symptom#
A tool run with --checkpoint-size N (or a config checkpoint size) on a stale or missing index gets an index built with the default size. Nothing reports the mismatch.
Cause#
ensure_indexes_fresh / ensure_index_fresh in resolve_and_build.cpp (about lines 233-241) build a ResolveAndBuildInput and leave checkpoint_size unset. resolve_and_build_index then uses DEFAULT_CHECKPOINT_SIZE (resolve_and_build.h:24). Callers such as dftracer_info, dftracer_stats, dftracer_view, dftracer_comparator and organize call the wrapper first and use their own size only in a later build path (comparator: wrapper at dftracer_comparator.cpp:479-483, size at :517).
Fix#
Not applied when this was found. The wrapper needs the caller's checkpoint size passed into ResolveAndBuildInput.
Evidence#
A review agent read the code of the PR 96 head (llnl-asr/dftracer-utils) and confirmed it. No run reproduced it.
Also found by searching
- dftracer_info --checkpoint-size 1048576 on stale index -> index rebuilt with default checkpoint size
- the checkpoint size I pass to the tool is silently ignored when the index gets rebuilt
- why does my index have the default checkpoint size even though I set one on the command line?
- ensure_index_fresh ResolveAndBuildInput checkpoint_size unset, DEFAULT_CHECKPOINT_SIZE used
- dftracer_view --checkpoint-size 1000 but the rebuilt index uses the default checkpoint size
- index rebuilt on stale index ignores my configured checkpoint size, no warning
- ensure_index_fresh doesn't pass checkpoint_size, why is index built with DEFAULT_CHECKPOINT_SIZE?
- dftracer_info dftracer_stats comparator checkpoint size mismatch in resolve_and_build