nats: a ledger's state and index buckets take the ledger's cap (design 47 H2 H-A-636) #751

Merged
mesh-tools merged 1 commits from fix/ledger-state-cap into main 2026-11-24 00:59:23 +00:00
Member

The delivery gate's records ledger asks max-mib 1024, but the bus module planned its state bucket and index buckets with no option (plan.go, the ledger case, stateSettings(options{})), so each stayed at the 64 MiB state default. The gate's state bucket is full since 2026-11-23 11:48 UTC; its operations are kept in the history and its state is behind (ADR 0597 §6); the condition 'Kept data is filling up' has been open since 10:20 CET.

Design line: design 47 H2 lead answer H-A-636 (hq design/47-H2-answers-60 b4b1fb2f); code milestone 'design 47 H2's corrections', item 12 (the operator folded the gate's records into it, no separate issue). The lifetime of ended records is H-A-634, built with that milestone.

  • 0f648e26: the ledger case gives its state bucket and every index bucket the ledger's own max-mib through stateSettings, and no other option of the ledger; a ledger with none keeps 64 MiB.

Quick vs thorough (quick-or-thorough): this is the quick relief (no data removed; the keeper grows a held bucket in place through its larger-settings path, and the state catches up by replay, ADR 0597 §5); the thorough fix is H-A-634's lifetime of ended records.

Tests: rows of TestEachTemplateIsPlannedUnderTheModulesNames (1024 -> state and index 1 GiB, no other option reaches them; none -> 64 MiB), each failing without the change; go vet, -tags integration, the module's suites, all catalog checks. Live (LSC-2): after the bus module's delivery, mesh-broker.show of mesh-delivery-gate records names its state bucket at 1 GiB and the condition clears. Affected: mesh-delivery-gate records (3 buckets), mesh-knowledge records (1); the bus account has no storage limit (read live by the review).

Reviewed-by: mesh-code-reviewer@shanks (for lead-47@shanks) at 0f648e26dd

The delivery gate's records ledger asks max-mib 1024, but the bus module planned its state bucket and index buckets with no option (plan.go, the ledger case, stateSettings(options{})), so each stayed at the 64 MiB state default. The gate's state bucket is full since 2026-11-23 11:48 UTC; its operations are kept in the history and its state is behind (ADR 0597 §6); the condition 'Kept data is filling up' has been open since 10:20 CET. Design line: design 47 H2 lead answer H-A-636 (hq design/47-H2-answers-60 b4b1fb2f); code milestone 'design 47 H2's corrections', item 12 (the operator folded the gate's records into it, no separate issue). The lifetime of ended records is H-A-634, built with that milestone. - 0f648e26: the ledger case gives its state bucket and every index bucket the ledger's own max-mib through stateSettings, and no other option of the ledger; a ledger with none keeps 64 MiB. Quick vs thorough (quick-or-thorough): this is the quick relief (no data removed; the keeper grows a held bucket in place through its larger-settings path, and the state catches up by replay, ADR 0597 §5); the thorough fix is H-A-634's lifetime of ended records. Tests: rows of TestEachTemplateIsPlannedUnderTheModulesNames (1024 -> state and index 1 GiB, no other option reaches them; none -> 64 MiB), each failing without the change; go vet, -tags integration, the module's suites, all catalog checks. Live (LSC-2): after the bus module's delivery, mesh-broker.show of mesh-delivery-gate records names its state bucket at 1 GiB and the condition clears. Affected: mesh-delivery-gate records (3 buckets), mesh-knowledge records (1); the bus account has no storage limit (read live by the review). Reviewed-by: mesh-code-reviewer@shanks (for lead-47@shanks) at 0f648e26dd5243ec8fc754af5773fcc77bff3f4b
mesh-tools added 1 commit 2026-11-24 00:46:46 +00:00
The keeper planned a ledger's state bucket and each index bucket with no
option, so each was the state default of 64 MiB whatever the ledger asked,
while its history and snapshot took max-mib. The delivery gate's ledger asks
1024 and its state bucket filled at 64. The state and index buckets now take
the ledger's max-mib and no other of its options; a ledger with none keeps
the state default. A raised cap reaches a held bucket through the keeper's
existing path for larger settings (check at the first view after a start).

The keeper's plan test: the existing ledger row now expects its state and
index buckets at the ledger's 16 MiB; a row with max-mib 1024 (and a past-values
option that must not reach them) expects 1 GiB; a row with none expects 64 MiB.

Design 47 H2's corrections, item 12 (lead answer H-A-636).

Builds: design 47 H2 H-A-636 (corrections, item 12)
mesh-tools merged commit 527676ccb4 into main 2026-11-24 00:59:23 +00:00
mesh-tools deleted branch fix/ledger-state-cap 2026-11-24 00:59:23 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#751