barrel_ngram_sup (barrel_ngram v0.9.0)
View Sourcebarrel_ngram top-level supervisor.
Owns the name registry, the dynamic shard supervisor, and the corpus-lifecycle coordinator supervisor. Isolation from the rest of the umbrella is this subtree: a shard crash never escapes it.
rest_for_one, with children ordered Registry, ShardSup, CorpusLifecycleSup: a Registry crash (a fresh, empty ETS table on restart) cascades to force-terminate and freshly restart BOTH ShardSup (so no now-unregistered shard can collide with a duplicate started against the same directory later) AND CorpusLifecycleSup (so no orphaned lifecycle coordinator can keep mutating shards/metadata after losing its via-name mutex) -- neither is possible under a plain one_for_one, which would restart only the registry itself and leave both siblings' state stale.
Summary
Functions
-spec init([]) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.