The interview problem
A customer's event stream delivers versions 21 and 23 but never 22. Decide whether to wait, apply or reconcile.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume events identify entity and source version. Determine whether payloads are full snapshots or incremental patches; the recovery decision depends on this contract. A full version-23 snapshot may supersede earlier state, while an incremental patch may require version 22. Keep a bounded gap buffer, retry/replay window and authoritative fetch path. Report unresolved entities explicitly instead of stalling the entire integration.
2. Trace the design or derivation
Detect gap → inspect payload semantics → buffer or fetch → reconcile state → resume entity
Scope the buffer by entity so one broken stream does not block unrelated customers. Track gap age and the authoritative fetch version; a fetch racing newer events must not move state backward. If historical side effects cannot be recovered, surface an owned reconciliation task rather than marking the entity fully repaired.
3. Calculate the example
If version 22 adds 5 units and version 23 subtracts 2, applying only 23 to an initial 10 yields 8 instead of 13. If version 23 contains the full resulting balance 13, the missing intermediate event need not prevent current-state reconstruction.
4. Failure cases and trade-offs
Current-state recovery does not reconstruct every historical side effect. A snapshot cannot safely replace an event needed for billing or notifications without separate reconciliation. Waiting preserves order but can block indefinitely; bounded waiting plus authoritative repair makes the operational trade-off explicit.
5. Validation, follow-ups and self-review
Test missing, duplicated and reordered versions with both payload types. Follow-up: what if the source cannot replay or fetch state? Self-review: distinguish state convergence from event-history completeness.
Sources and related practice
Technical reference: debezium.io — Change events and tombstones; version-gap recovery policy is original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Reconcile conflicting records across customer systems; Design resumable browser event streams.
Continue your preparation
Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.