feat: deduplicate full-import health validation - #833
Conversation
|
Wouldn't be sufficient just don't run a instant health check on import and just wait for the next scheduled check? |
|
lol yes this is probably much simpler. I can still see the reason to do a health check after import, like if you only check 1% of segments on import then it is probably worth health checking soon after import. But we definitely don't need it if your import percentage check is equal to or higher than your health checks. |
|
Thinking about this more, leaving import percentage extremely low like 1% and then having the health check run quickly after import might be better? Then if you really needed to start streaming quickly you could get started, and then repair if it came back unhealthy since it should get caught by the health check soon after. I'll test it out and see how that's working and might close this out if that is easier and I feel like recommended behavior. |
What this PR is for
A successful full import already performs a complete 100% STAT validation, but the importer could immediately schedule another health STAT for the same fully validated file. This PR carries a short-lived, exact-segment validation receipt into post-import health scheduling so that redundant check is skipped only when the evidence still matches.
In practical terms: it removes duplicate provider work after a successful complete import without weakening normal health checking.
What changes
What this deliberately does not change
Verification
git diff --check: PASSmake build: PASSmake test: blocked by the pre-existinginternal/metadata/TestDirectoryModTime_StableAcrossHealthSweepfailure, reproduced on the clean base.make lint/make check: blocked by three pre-existing findings in unchangedinternal/apifiles.The metadata test and API lint/check findings are intentionally excluded from this PR and should be handled separately.