From 3c8aadf41fd8879a60b5b34e76ab36fecf6826e5 Mon Sep 17 00:00:00 2001 From: Gregory Salaun Date: Wed, 12 Aug 2026 17:39:16 +0200 Subject: [PATCH] chore(gridcache): log what each batch writes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A batch that never reaches the disk looks exactly like one that does: the locators are in memory either way until the next restart, which is the one moment the difference shows. The shutdown flush was the least observable of all — it runs last, and nothing said whether it had written anything. --- internal/gridcache/gridcache.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/gridcache/gridcache.go b/internal/gridcache/gridcache.go index b96646d..434854d 100644 --- a/internal/gridcache/gridcache.go +++ b/internal/gridcache/gridcache.go @@ -186,6 +186,10 @@ func (s *Store) Flush() error { s.requeue(batch) return err } + // Logged because a batch that never reaches the disk looks exactly like one + // that does: the locators are in memory either way until the next restart, + // which is the one moment the difference shows. + s.logf("gridcache: wrote %d locators", len(batch)) return nil }