stopPartition

suspend fun stopPartition(partition: Int)

Stops reading partition as stop does for all of them: waits at most SubscriptionOptions.stopTimeout for its entries in flight and saves its checkpoints, so the node can hand the partition off. The other partitions keep running. Nothing happens when it is not read; a start of it running is waited for first, a stop of it under way waited for instead.

The lifecycle mutex is held only to take the partition out of the run: its drain and its save run outside it, so the partitions a hand-off stops together drain together (RT-14), and a start of the partition waits for them.