A3 package 2: the scribe log's mode from config, the filer once per cluster #19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 (feature): the scribe log's reckon-db store takes its
modefrom configuration instead of the hardcodedsingle, so a clustered mcl-martha release can run it as a replicated store; and because that same log then holds every node's lessons, the lesson filer runs once per connected partition undermcl_om_singletoninstead of once per node.Raf, 2026-12-02: "Run the whole path (Recommended)" (the crew runs the whole path to one clustered mcl-martha release, in order, without coming back to him). Raf, 2026-12-02: "trust on sight. mcl-martha services should auto-cluster over LAN, no mcl-station required. Distributed Erlang offers us all we need." Raf, 2026-12-02: "Three for failover (Recommended)" (mcl-martha#1 LAN addendum menu).
Refs martha-ai/mcl-martha#1 (A3 package 2, and package 4 for the wrap: "each of mcl-kanban, mcl-mail, mcl-scribe, mcl-whiteboard — reckon-db store
moderead from config, not hardcodedsingle"), macula-services/mcl-om#8 (mcl_om_singleton, packages 3 and 4), reckon-db-org/reckon-db#2 (landed: a cluster join never wipes a store that holds events) and reckon-db-org/reckon-db#14 (open: 5.12.0's leadership-transfer case; the land waits for 5.12.1 on hex).What this requires of the service
mcl_scribe_service:event_store/0hardcodesmode => single. It reads the service's app env instead, defaultsingle, so a standalone release and every existing deployment boot exactly as today. An unknown value fails the boot naming the value, never a silent fallback tosingle.One source of truth: the same function decides both the store's mode and the filer's child shape (below), so they cannot drift.
reckon_db_cluster:local_healthy/1). In cluster modemcl_scribe_store:open/1waits for the store to join a cluster (a live leader, more than one member, the local Raft server answering) before it returns, so the app does not boot, the mesh does not advertiserecord_lesson, and no lesson is appended into the join window. The wait is bounded and its failure names the store and that it has not joined. A filer's replay on the data-holder node is safe: that node is the authority and never joins.data_dirs, start them again while the holder is up). The release's deployment notes must say so.mcl_om_singletonwhen the store is clustered, and stays the plain per-node worker when it issingle. Under a netsplitglobalruns one copy per connected partition; the PR states what a double run does on each side, and no new guard is added for it (a new check needs the owner's yes).Done when
modecomes from the service's app env, defaults tosingle, and an unknown value fails the boot naming it; a test pins both the default and the refusal, and the standalone suite (single mode) stays green unchanged.mcl_om_singletonguard in cluster mode and the plain worker in single mode, from the one source of truth; a test pins both shapes, and that alone on a node the guard runs the filer and the local name answers.deploy/), so a fresh cluster cannot form on the empty boxes first.reckon_dbpin floor is~> 5.12.1on the tip that is handed off, and the suite is green on it.Do NOT add a guard or a timer for the split case without the owner's yes (the no-new-check rule); state it instead. Do NOT change
singleas the default, and do NOT makesinglethe mode for a multi-node deployment in any doc.Amendment to Done-when 2 (Supervisor, 2026-12-02). The wait is not bounded: it logs what it waits for (
scribe_store_not_joined) every few seconds and stays for the operator, because a data holder is refused a join forever and a bounded failure would only put it in a restart loop that hides the cause; a timeout was ruled out. The test sees the boot still holding and the line, not a refusal.Landed on main at
a69a2d7c93(PR 20, fast-forward fromd9551a3, Terra on Mars's LAND); PR 20 closed.Done-when checked against the diff: the mode default, the configured value and the refusal by name are pinned in
lesson_log_tests;mcl_scribe_store_testsproves a cluster-mode store holds the boot and logsscribe_store_not_joinedwith what it waits for;guide_lessons_sup_testspins the plain child in single mode and themcl_om_singletonguard in cluster mode, and that alone on a node the guard runs the filer; the per-partition double run is stated in PR 20 with no guard added (Mars/Supervisor's ruling); the operator step sits in the README besidestore_mode; and the tip carries{reckon_db, "~> 5.12.1"}(checksum 80F92ACB…31A5) with lint, xref, eunit 88 and dialyzer green on it.Closing.
Main is green on
a69a2d7c— the three runs queued when this package was closed all succeeded:build-push.yml— success, 12:37–12:42Z (the Release job is thev*tag one and stays skipped on a main push)c4-model.yml— success, 12:38Zlint.yml— success, 12:39–12:43ZNothing is reopened: the store's mode from config and its join gate stand as landed in
a69a2d7c.