OversizedMessage

data class OversizedMessage(val storageVersion: Int, val storageEpoch: StorageEpoch, val blockIndex: BlockIndex, val payloadId: String, val termId: Long) : ReplicaMessage.ProtobufMessage

Stands in for a message the log declined for its size; path holds that message's own encoding.

termId is the wrapped message's, so a reader fences on this envelope without fetching the payload. blockIndex is the open block as the writer last saw it, rather than the last completed one, so that GC — which collects on it — errs towards keeping a payload rather than dropping one still referenced. It is read off the catalog without synchronising against the apply coroutine that advances it, so a block adopted in between leaves the payload keyed one block early; blocksToKeep is the margin.

Writer, reader and GC all go through path and blockIndexOf; the key format lives nowhere else.

Constructors

Link copied to clipboard
constructor(storageVersion: Int, storageEpoch: StorageEpoch, blockIndex: BlockIndex, payloadId: String, termId: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val blockIndex: BlockIndex
Link copied to clipboard
val path: Path
Link copied to clipboard
Link copied to clipboard
val storageEpoch: StorageEpoch
Link copied to clipboard
Link copied to clipboard
open override val termId: Long

Functions

Link copied to clipboard
override fun encode(): ByteArray
Link copied to clipboard
open override fun toLogMessage(): ReplicaLogMessage