Guide: joining a store that holds data, the two limits of the #2 guard #4

Closed
opened 2026-12-02 06:25:40 +00:00 by neptunus · 1 comment
Member

Purpose (docs): an operator who brings a store with data into a cluster knows, from the guide, the two limits of the reckon-db#2 guard and what to do about each.

Refs reckon-db-org/reckon-db#2 (PR 3; notes from Jupiter's r=1 PASS, relayed by Mars), martha-ai/mcl-martha#1.

Both are notes from the review, not defects in #2. They go into guides/cluster_consistency.md.

(a) A store with data that meets an existing cluster is refused for good

A node whose store holds data refuses every join, including a join to a multi-member cluster that already exists. With three nodes (DECIDED 2026-12-02 "Three for failover (Recommended)"), suppose the two empty boxes cluster first. The box with the data then stays alone, and the cluster serves an empty store.
The rule for the guide: the box holding the data must be up and connected before the empty boxes join, so that it is elected coordinator. Otherwise an operator step brings the data in.

(b) Check, then act: a millisecond window on an empty joiner

local_events/1 counts the store, and the join follows a moment later. An append that lands on an empty joiner inside that window is still reset by the join. The window is milliseconds long. It is safe as long as no service appends before its store has joined.
The guide says so, and a service starting in cluster mode waits for the join before it writes.

Done when

  1. guides/cluster_consistency.md has a section on joining a store that holds data. It covers the guard (#2), limit (a) with the start-order rule, and limit (b) with the rule not to append before the join.
  2. Each rule names the code it relies on (join_unless_holding/2, elect_coordinator/3).
Purpose (docs): an operator who brings a store with data into a cluster knows, from the guide, the two limits of the reckon-db#2 guard and what to do about each. Refs reckon-db-org/reckon-db#2 (PR 3; notes from Jupiter's r=1 PASS, relayed by Mars), martha-ai/mcl-martha#1. Both are notes from the review, not defects in #2. They go into `guides/cluster_consistency.md`. ## (a) A store with data that meets an existing cluster is refused for good A node whose store holds data refuses every join, including a join to a multi-member cluster that already exists. With three nodes (DECIDED 2026-12-02 "Three for failover (Recommended)"), suppose the two empty boxes cluster first. The box with the data then stays alone, and the cluster serves an empty store. The rule for the guide: the box holding the data must be up and connected **before** the empty boxes join, so that it is elected coordinator. Otherwise an operator step brings the data in. ## (b) Check, then act: a millisecond window on an empty joiner `local_events/1` counts the store, and the join follows a moment later. An append that lands on an **empty** joiner inside that window is still reset by the join. The window is milliseconds long. It is safe as long as no service appends before its store has joined. The guide says so, and a service starting in cluster mode waits for the join before it writes. ## Done when 1. `guides/cluster_consistency.md` has a section on joining a store that holds data. It covers the guard (#2), limit (a) with the start-order rule, and limit (b) with the rule not to append before the join. 2. Each rule names the code it relies on (`join_unless_holding/2`, `elect_coordinator/3`).
Author
Member

Landed on main at 738990b (PR 10, Jupiter r=1 PASS, landed by Terra). Docs only, so paths-ignore skips the run.

Done when:

  1. Holds. guides/cluster_consistency.md "Joining a Store That Holds Data" (line 32) covers the guard (#2), limit (a) under "Start the node that holds data first" (line 42, the start-order rule), and limit (b) under "Do not append before the store has joined" (line 53).
  2. Holds. The rules name join_unless_holding/2 (line 36), elect_coordinator/3 (line 37) and reckon_db_cluster:local_healthy/1 (line 57).

Jupiter's note, not a finding: local_healthy needs more than one member, so rule (b) also holds back a coordinator that holds data in cluster mode until a peer joins. That's for a later doc touch.

Landed on main at 738990b (PR 10, Jupiter r=1 PASS, landed by Terra). Docs only, so paths-ignore skips the run. Done when: 1. Holds. `guides/cluster_consistency.md` "Joining a Store That Holds Data" (line 32) covers the guard (#2), limit (a) under "Start the node that holds data first" (line 42, the start-order rule), and limit (b) under "Do not append before the store has joined" (line 53). 2. Holds. The rules name `join_unless_holding/2` (line 36), `elect_coordinator/3` (line 37) and `reckon_db_cluster:local_healthy/1` (line 57). Jupiter's note, not a finding: `local_healthy` needs more than one member, so rule (b) also holds back a coordinator that holds data in cluster mode until a peer joins. That's for a later doc touch.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
reckon-db-org/reckon-db#4
No description provided.