Skip to main content

wait_until_drained

Function wait_until_drained 

Source
pub async fn wait_until_drained(
    store: &AssignmentSnapshotStore,
    me: NodeId,
    poll: Duration,
    deadline: Duration,
) -> bool
Expand description

Poll the durable assignment snapshot until me owns no vnodes (its state has been reassigned elsewhere) or deadline elapses. Returns true if fully drained. Used by a draining node to know when it is safe to exit.