From 5ac1e775205593a07cca1b5b44adc631da35d4f0 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Tue, 25 Jun 2024 14:19:41 +0400 Subject: [PATCH] lib/storage: save storage ID after init This helps to avoid re-creating a storage ID in case of unclean shutdown. Signed-off-by: Zakhar Bessarab --- lib/storage/storage.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 2d7fa1a12..1b5e2ae9e 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -264,6 +264,7 @@ func MustOpenStorage(path string, retention time.Duration, maxHourlySeries, maxD } else { nodeID := rand.Uint64() s.nodeID = nodeID + s.mustSaveNodeID() } // Load indexdb