From a75d2d07bfaa9490a0181184d1ff13ad3073121c Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 2026 03:23:34 +0100 Subject: [PATCH] I6 fix: the indexer's heard is capped at 32 MiB, above its live fill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review round 1 found heard capped at 8 MiB (module.json:137) while its live fill is above a quarter of that. Fill read 2026-11-22 02:23 UTC with nats.nats_buckets on novox (the bus module's show makes no entry for a foundation part's old-section state): mesh-delivery-indexer_heard 4,654,001 bytes (4.44 MiB), 5,499 values. Four times the fill is 17.75 MiB; the smallest power of two above it is 32 MiB (H-A-437). Builds: design 47 H2 §814, §820; H-A-461 (3), H-A-437 --- modules/mesh-delivery-indexer/manifest_test.go | 9 +++++---- modules/mesh-delivery-indexer/module.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/mesh-delivery-indexer/manifest_test.go b/modules/mesh-delivery-indexer/manifest_test.go index c8c49cd36..8eb5d50ec 100644 --- a/modules/mesh-delivery-indexer/manifest_test.go +++ b/modules/mesh-delivery-indexer/manifest_test.go @@ -136,12 +136,13 @@ func TestManifestDeclarations(t *testing.T) { // 1238/AC1, 1444 (reads the build if !slices.Equal(m.Uses, []string{"operator-channel"}) || !slices.Contains(m.Invokes, "seat:mesh-module-assigner.assignments") || !slices.Contains(m.Invokes, "seat:mesh-module-assigner.placement") { t.Errorf("uses = %v, invokes = %v, want the seat operator-channel used and seat:mesh-module-assigner.assignments invoked", m.Uses, m.Invokes) } - // 1126 note 76: heard keeps the last 64 FORGE messages the indexer handled, for indexer_heard; 8 MiB, each reservation - // and each gathering of them a key of its own time to live (design 47 H2 §805, H-A-420 (3), H-A-436). + // 1126 note 76: heard keeps the last 64 FORGE messages the indexer handled, for indexer_heard, each reservation and each + // gathering of them a key of its own time to live (design 47 H2 §805, H-A-420 (3), H-A-436); 32 MiB, its live fill 4.44 MiB + // (novox, 2026-11-22) more than a quarter of 8 (H-A-461 (3), H-A-437). // Design 47 H2 §814, §820 (H-A-411 (2), H-A-437): every state names its cap, 8 MiB where the live fill (novox, 2026-11-22) // is a quarter of it or less, else the smallest power of two above four times the fill: candidates 3.78 MiB at 16, - // manifests 5.21 MiB and seat-definitions 4.19 MiB at 32. - if want := []state{{Name: "candidates", History: 10, MaxMiB: 16}, {Name: "heard", History: 64, MaxMiB: 8, KeyTTL: true}, {Name: "manifests", History: 1, MaxMiB: 32}, {Name: "predefined", History: 5, MaxMiB: 8}, {Name: "taken", History: 1, MaxMiB: 8}, {Name: "takeins", History: 1, MaxMiB: 8}, {Name: "oldsections", History: 1, MaxMiB: 8}, {Name: index.RunsState, History: 1, MaxMiB: 8}, {Name: index.PackagesState, History: index.PackagesHistory, MaxMiB: 8}, + // manifests 5.21 MiB, seat-definitions 4.19 MiB and heard 4.44 MiB at 32. + if want := []state{{Name: "candidates", History: 10, MaxMiB: 16}, {Name: "heard", History: 64, MaxMiB: 32, KeyTTL: true}, {Name: "manifests", History: 1, MaxMiB: 32}, {Name: "predefined", History: 5, MaxMiB: 8}, {Name: "taken", History: 1, MaxMiB: 8}, {Name: "takeins", History: 1, MaxMiB: 8}, {Name: "oldsections", History: 1, MaxMiB: 8}, {Name: index.RunsState, History: 1, MaxMiB: 8}, {Name: index.PackagesState, History: index.PackagesHistory, MaxMiB: 8}, {Name: views.MarksState, History: 1, MaxMiB: 8}, {Name: index.FindingsState, History: 5, MaxMiB: 8}, {Name: views.StatusState, History: 1, MaxMiB: 8}, {Name: index.RequirementsState, History: 5, MaxMiB: 8}, {Name: index.SeatDefinitionsState, History: 5, MaxMiB: 32}, {Name: index.EntryIndexState, History: 1, MaxMiB: 8}, {Name: index.NamedState, History: 1, MaxMiB: 4}, // design 47 G §695 diff --git a/modules/mesh-delivery-indexer/module.json b/modules/mesh-delivery-indexer/module.json index 965ea9527..5a9a0307b 100644 --- a/modules/mesh-delivery-indexer/module.json +++ b/modules/mesh-delivery-indexer/module.json @@ -134,7 +134,7 @@ }, "state": [ { "name": "candidates", "history": 10, "max-mib": 16 }, - { "name": "heard", "history": 64, "max-mib": 8, "key-ttl": true }, + { "name": "heard", "history": 64, "max-mib": 32, "key-ttl": true }, { "name": "manifests", "history": 1, "max-mib": 32 }, { "name": "predefined", "history": 5, "max-mib": 8 }, { "name": "taken", "history": 1, "max-mib": 8 },