A3 packages 2 and 4: the store mode comes from config, a cluster node waits for its join, and the mesh emitters run once per cluster #7
Loading…
Reference in a new issue
No description provided.
Delete branch "venus/a3-mesh-singleton"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (capability): whiteboard can run on a clustered store, so every node of a cluster holds every board and a node can go down without losing one.
A3 package 2 (#6) together with the held A3 package 4 (#5) in one range: 509c6c5..a3b0a47.
What changes
MCL_STORE_MODE=single(default, unchanged) orcluster. Any other value refuses the boot by name.GuideBoardLifecycle.Store.mode/0is the one reader.EventStore.open/1asks reckon-db to join once (reckon-db#15: a store started after its node connected never joins by itself). It returns only whenreckon_db_cluster:local_healthy/1holds. The service, its mesh write relays and the web UI start after open, so nothing appends in reckon-db's count-then-join window.mcl_om_singleton, one per cluster (#5). In single mode each node runs its own, because each store holds only that node's events.~> 5.12(reckon-db#2).Operator rules (README, "Cluster mode")
Netsplit: one singleton per connected part
globalruns one copy of each emitter in every connected partition, so during a split each side's emitter publishes its own side's events, and the receivers are idempotent. On healing,globalstops one copy and the survivor takes over. That causes a burst, not a gap: evoq backfills a handler that registers late from 0, events from before the node's boot are skipped as replay, and the rest are republished (#5 comment 8131). No duplicate changes a receiver's state. I see no harm that needs a guard, and none is added.Tests (local: format, compile --warnings-as-errors, credo, mix test 132/0, dialyzer)
cluster_open_test.exs: two real peers in cluster mode, connected before the second store starts. The lone node does not open in 10 s; both open once they meet. Mutants: no wait → the lone node opens (fails); no join ask → the second never opens (fails).one_node_publishes_test.exs: single mode gives one handler per node on two connected peers and a plain child in this VM; cluster mode gives one per cluster, moving on takeover. Mutants: mode fixed to cluster fails 2, fixed to single fails 1.runtime_store_mode_test.exs: the real runtime.exs: unset is single; single and cluster are read; any other value is refused by name.Before the land
reckon-db#14 (a new leader cannot answer
is_activeduring activation): the pin floor moves to reckon_db 5.12.1 once it is on hex. No service moves to cluster mode before then.Refs #6, Refs #5