Vixen
02b45cc4
csharp
public sealed class FleetGrain

A region's whole fleet, and what a rollout is aiming at. Doc 27 § Grains, § Upgrades.

Read the guide page for this →

Remarks

⚠ It is a register and an alert channel, not a controller. The decisions about one map belong to that map's grain, which is where the roster and the arrival rate are; collecting them here would make one grain the serialisation point for every placement in a region, which is precisely the bottleneck the per-map keying exists to avoid.

What it does own is the version every new shard is started on — because that is a decision about the region rather than about a map — and the escalation that a drain which cannot finish arrives at. Doc 27 § Drain: nothing is force-disconnected, and the escalation ends in a person deciding rather than in a timeout deciding for them.

Methods (7)

  • public FleetGrain(ILogger<FleetGrain> log)

    Stands one up.

  • public Task<ShardReport[]> Shards()

    Every shard in the region.

  • public Task ShardChanged(ShardReport report)

    Told by a map grain when one of its shards changes.

  • public Task Escalate(ShardId shard, string reason)

    A drain that could not finish.

  • public Task<RealmVersion> Target()

    The version new shards are started on.

  • public Task SetTarget(RealmVersion version)

    Points the fleet at a version. Rolling back is the same call with the old pair.

  • public Task<double> VersionSpread()

    The fraction of shards not on Target — doc 27 § Upgrades' watched number.