Compacted Event Logs and Replay Semantics

Distinguish replay that reconstructs the latest state from replay that must reproduce every historical transition.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Reconstructing a map can use retained representatives
  2. Deletions require a retained meaning

Reconstructing a map can use retained representatives

A compacted log may preserve a recent value per key rather than every older update. A consumer rebuilding current state can often use that representation under the broker’s ordering and compaction contract. Offsets can have gaps even if retained records preserve their relative order. A consumer counting every update is asking a different question and needs history that still contains those events.

Deletions require a retained meaning

A deletion marker can ensure a consumer removes a previously observed key. Removing markers too early may leave an offline consumer with old state that replay no longer corrects. Document the allowed lapse and recovery path, such as rebuilding from a fresh baseline. Source offsets govern positions and retention. Replica reconciliation faces related risks when old values meet missing deletion information.[1][2]

References

  1. Tyler Akidau et al., The Dataflow Model ↩
  2. Apache Beam, Programming Guide ↩