public sealed class ShardLifecycleOne realm process's life, as the cluster records it. Doc 27 § Grains' spine.
Remarks
Requested → Starting → Ready → Draining → Stopping → Stopped, with Failed and Lost off the side. Each transition is one method, and the ones that are not edges are refused — a shard going Stopped → Ready would be a process the cluster had already written off answering a heartbeat, which is a real thing that happens when a supervisor restarts something it should not have.
⚠ Draining is one-way, and that is what makes a rollout finish. Doc 27 § Upgrades drains old-version shards and waits; a shard that could be talked out of draining would make the rollout's completion a race rather than an invariant.
Fields and properties (2)
public ShardId ShardWhich shard.
public ShardState StateWhere it is in its life.
Methods (10)
public ShardLifecycle(ShardId shard, HealthOptions? options = null)Stands one up.
public void Requested(ShardKey shardKey, ShardCapacity shardCapacity)A decision that this shard should exist.
public void Starting(RealmInstanceId realmInstance, RealmEndpoint at)The placement backend created something.
public void Ready(RealmEndpoint at)The realm loaded its map and is accepting sessions.
public ShardState Heartbeat(ShardHeartbeat sample)Records a heartbeat and answers with the state the realm should be in.
public void Drain()Stop taking arrivals and move everyone out at safe moments.
public void Stopped()It ended the way it was asked to.
public void Lost()It went away without being asked.
public bool Expire()Declares a silent shard lost, if it has been silent long enough.
public ShardReport Report()What this shard is, for anybody who asks.
Used by (5)
- FakeClusterVixen.Live.Realm.Cluster.Tests
- FakeShardVixen.Live.Realm.Cluster.Tests
- RealmClusterTestsVixen.Live.Realm.Cluster.Tests
- ShardGrainVixen.Live.Orchestrator
- ShardLifecycleTestsVixen.Live.Orchestrator.Tests