Truncated

data class Truncated(val atOffset: Long, val reason: TruncationReason) : ReplayEvent<Nothing>

The replay stopped early: the archive is damaged, or was still being written, at atOffset.

Every frame emitted before this one is intact and complete. Nothing after atOffset was read — an append-only log is ordered, so a frame that does not validate makes everything behind it untrustworthy, and replay stops rather than skipping to the next segment and returning a history with a silent hole in it.

Constructors

Link copied to clipboard
constructor(atOffset: Long, reason: TruncationReason)

Properties

Link copied to clipboard

the append offset replay stopped at. For a torn tail this is where the next append will land, so it is also the point to resume from once the writer catches up — but see TruncationReason.MissingRegion, where it is the end of the readable history and not a resume cursor.

Link copied to clipboard

why the replay stopped, and — the part a consumer acts on — whether resuming from atOffset later could ever help.