AppendResult
What one Bolt.append did.
An append is best-effort: it reports failure rather than throwing, so a full archive disk cannot take down the application whose telemetry it is archiving.
Samples
when (val result = bolt.append(ops)) {
// endOffset is where the NEXT frame lands — the resume cursor.
is AppendResult.Written -> rememberCursor(result.endOffset)
// Nothing written, nothing lost: an empty append, or one whose ops were all
// compaction records. Neither carries content, so neither earns a frame.
AppendResult.Skipped -> Unit
// The ops are lost from the archive — and the live replica will window them away
// next, so they are gone from BOTH sides. `insertDots` is what lets a consumer defer
// that windowing, re-feed, or correlate the gap; a `failed++` tally could do none of
// those, which is why this reports identities and never a count.
is AppendResult.Failed -> deferWindowingFor(result.insertDots)
}Content copied to clipboard