Whole Import and Batch-Level Commit Contracts
An import can require all input to commit together or allow completed batches to survive a later error. Each choice changes what success and recovery mean.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace item 21
If the first twenty items are committed in batches and item 21 is invalid, twenty may remain. An atomic whole import can leave none saved. Batch boundaries make the unit of progress visible.
Report a restart point
A completed-batch design should say where to resume and what happened to earlier results. See checkpointing an import.[1]
Follow a late failure through two public contracts
A file contains five valid chunks and one bad sixth chunk. A whole-import transaction can roll back all six. A partial-acceptance design can preserve the first five and show exactly where it stopped. Choose from what readers may observe. See transaction boundaries.
Late error in chunk 6
Whole import → zero new visible chunks
Batch commits → chunks 1–5 remain visible, with failure reason
Retry contract differs for the two modes
Test storage duration and observability
A large transaction can increase resource retention. Partial commits require clear progress and reconciliation. Verify observable rows after a crash or malformed final chunk under the documented contract.