Checking Work Conservation in a Parallel Job
A data-parallel job should account for every intended input contribution even when tasks overlap or are retried.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace two adjacent chunks
Ranges \([0,4)\) and \([4,8)\) cover eight positions. If the first included four as well, one item would be counted twice. Half-open slices give the indexing convention.
Check retries and missing outputs
Stable chunk identities let a combining stage recognize overlapping deliveries of one result. Assert known counts and a small independently computed output. See repeated events.[1]
Verify every partition contributed exactly once
An aggregate expected to process ten IDs can still return plausible results if one chunk is skipped and another duplicated. Track chunk identity and coverage along with the reported sum or output rows. See splitting into independent chunks.
Expected chunks [0,4), [4,8), [8,10)
Observed chunks A,B,C once each
Duplicate B would inflate work. Missing C could conceal tail defects.
Verify both independent facts in a test
Check total input cardinality and the exact aggregate from a known fixture. Include collisions in small values so sum alone cannot prove coverage.