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 <z.bessarab@victoriametrics.com>
This commit is contained in:
Zakhar Bessarab 2024-06-25 14:19:41 +04:00
parent 71e729f3f8
commit 5ac1e77520
No known key found for this signature in database
GPG key ID: 932B34D6FE062023

View file

@ -264,6 +264,7 @@ func MustOpenStorage(path string, retention time.Duration, maxHourlySeries, maxD
} else {
nodeID := rand.Uint64()
s.nodeID = nodeID
s.mustSaveNodeID()
}
// Load indexdb