Nebula
Control plane

ScopeState

The states a ScopeInfo row can be in.

generated from the sources
public static class ScopeState

The states a ScopeInfo row can be in. The orchestrator owns the machine; every other role reads it off the mirrored document. Design of record: docs/scope-lifecycle.md.

(no row) --activate--> Active --idle & ShouldRetire--> Retiring --every part checkpointed--> Retired
                         ^                                                                      |
                         +------ every part restored ----- Restoring <----- activate ----------+

A row is never deleted by the lifecycle: IControlPlane.RemoveScope stays the explicit way out.

Fields

Active

public const string Active = "active";

The scope's lease rows exist and it admits clients. It says nothing about who owns them or what is loaded (ControlPlaneExtensions.IsScopeReady).

Retiring

public const string Retiring = "retiring";

Retiring: admission is refused, and every part is checkpointing its persistent entities and emptying itself.

Retired

public const string Retired = "retired";

Every part was checkpointed and its lease row deleted. The row stays so the key keeps its identity and a re-activation is idempotent.

Restoring

public const string Restoring = "restoring";

The scope was asked for again: the lease rows are back and admission waits until every part has reported its restore complete.

Methods

AdmitsClients

public static bool AdmitsClients(string state);

A client may be placed in this scope (subject to ControlPlaneExtensions.IsScopeReady).

On this page