Acme Marketing Architecture

5. Recover, reconcile, reload, replay: semantics and mechanisms

5. Recover, reconcile, reload, replay: semantics and mechanisms

Date: 2026-10-26

Status

Accepted


Problem

The brief says the solution must "recover, reconcile or reload data when required" and asks how the architecture handles "failures, retries, duplicate data, partial processing, missed changes and recovery/reprocessing". Those words hide four different operations, and a design that supports one does not automatically support the others. The architect raised the same ambiguity: is this historical replay, or idempotency?

Brainstormed interpretations, all of which turn out to be needed:

Term Meaning adopted Trigger Touches the source?
Recover Resume a run after a failure from the last committed position, without duplicates API 5xx mid-page, capacity throttling, deployment Yes, from the checkpoint
Reload Re-extract a bounded window or object from the source, because the source changed its answer or an extraction was wrong Google Ads restatement; Salesforce bulk job failure; a reconciliation discrepancy; a bug in an adapter Yes, bounded window
Replay Rebuild Silver and Gold from Bronze with new logic, without calling any source Transformation bug; schema change; new Gold measure No
Reconcile Measure whether the lake matches the source (and whether Gold matches Silver), and turn discrepancies into targeted reloads Scheduled daily; after any incident Yes, counts only
Idempotency The property that makes all of the above safe: any run for a window can be executed twice with the same result Every run —

Event streams complicate this: Salesforce replay expires after 72 hours and HubSpot webhooks cannot be replayed at all, so reload of a window can only ever come from the polling path.


Decision

We will implement the following mechanisms, all of them, and name them in the run ledger.

Idempotency (the foundation)

Recover

Reload

Replay

Reconcile


Considered Options

Option Summary Pros Cons
✅ All four operations, idempotent sinks, control ledger As above Each failure mode in the brief maps to a named mechanism; auditable More control tables and jobs to build
Treat CDC and webhooks as truth, reload by full re-pull Event streams drive Silver; recovery = full reload Fewer moving parts A silent gap is undetectable until someone notices; full reload burns allocation. Rejected.
Nightly full reload of everything Idempotent by construction No watermarks or cursors API allocation grows with data; no intraday freshness. Kept only for Google Ads entity snapshots.
Exactly-once pipelines Transactional outbox across stores Theoretically clean Not achievable across three SaaS APIs, OneLake and a message bus; the cost is complexity with no gain. Rejected in favour of idempotent sinks.

Consequences

Positive:

Negative / Trade-offs:

Risks: | Risk ID | Description | Impact (E/H/M/L) | Mitigation | |---------|-------------|------------------|------------| | R1 | Source count semantics differ from lake semantics (time zones, soft deletes) | M | Reconcile on source-modified-day in UTC; include deleted flag in both counts; tolerance per object | | R2 | A reload of a large window exhausts the daily API allocation | M | Reload scheduler spreads windows across days; budget check before scheduling | | R3 | Replay changes Gold figures that were already reported | M | Time travel comparison; business events for restated partitions; freeze policy for closed months on request |