Jump to a problem, path or page
Jump to a problem, path or page
01 · Develop the design
Pin immutable import inputs, stage bounded validated rows and commit deterministic batches with progress in one transaction. Expose partial success and cancellation truthfully instead of implying a global rollback.
Stage 1
Pick the commit model
This exercise uses explicit partial batch commit. All-or-nothing imports need staging plus a supported atomic publication/transaction boundary.
Stage 2
Keep row provenance
Assign source row numbers/keys, validated mapping version and deterministic batch IDs. Error reports should identify source locations without leaking unrelated data.
Stage 3
Budget rejected work too
Bound fields, row size, parser buffers and error counts. A malformed file must not create an unlimited in-memory error report.
02 · Work through the method
03 · Justify the choices
What should an import job pin?
Immutable source version, mapping/schema version and tenant scope
A retry must process the same intended bytes and mapping rather than silently changing input.
How do retries avoid duplicate committed rows?
Commit deterministic batch/row identities and progress atomically
Write and progress semantics must make a repeated batch a no-op or equivalent upsert.
What does cancellation promise for committed batches?
Stop future work under policy; already committed batches remain unless explicitly compensated
Partial-batch mode cannot silently offer all-or-nothing cancellation after durable writes.
04 · Plan the evidence