HandoffOptions

class HandoffOptions @InternalWowApi constructor(val capacity: Int = DEFAULT_CAPACITY, val gapWait: Duration = 1.seconds, val probeInterval: Duration = 1.seconds)

How a node hands its own commits to its tails in memory, always: the constants of the hand-off, not settings:

  • capacity: the most entries one tail holds that it has not taken yet; a tail that falls further behind drops what comes next and reads the store instead, so the append path never waits for it;

  • gapWait: the longest a tail waits for a missing sequence that an append of this node still in flight may hold, before it reads the store from its position. Appends hand their commits over in the order their callers return, so a sequence is often missing for a moment, and a pause of the process (a GC, a starved CPU) stretches that moment past any timer. So a tail does not wait on the clock: it waits for the appends that may hold the missing sequence, those in flight when the gap appeared, and reads the store as soon as every one of them returned without it (another node's append during a hand-off; an unknown outcome). The wait only bounds an append that does not return: 1 s, the longest poll interval, which bounds how late another node's entries are read anyway;

  • probeInterval: how long a tail waits without a commit of this node before it checks the partition's head for entries other nodes appended: the log's longest poll interval (wow.log.max-poll-interval).

Fields may be added: Wow builds it from the host's configuration, so the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(capacity: Int = DEFAULT_CAPACITY, gapWait: Duration = 1.seconds, probeInterval: Duration = 1.seconds)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String