startPartition

suspend fun startPartition(partition: Int, reads: Job? = null)

Starts reading partition on the running runtime, each subscription from its checkpoint: the node has just acquired it. Nothing happens when it is read already; a start of it already running is waited for.

What the start reads, each subscription's parked aggregates and checkpoint and the partition's cut-over row, is read at once and outside the runtime's lifecycle mutex, so the partitions a reconcile starts together do not queue behind each other's round trips; the checkpoints its subscriptions start at for the first time are saved in one write. Only opening the partition's workers holds the mutex.

With reads, the partition reads nothing until that job completes: neither its entries nor its parked retries. Its subscriptions stand at their checkpoints meanwhile, and their lag counts what waits. A node holds back the partitions its first reconcile starts this way (me.ahoo.wow.runtime.cluster.PartitionOwnership.start): the backlog the first of them would read at once, a history migrate-data imported say, would slow down the starts of the others.