mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
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:
parent
71e729f3f8
commit
5ac1e77520
1 changed files with 1 additions and 0 deletions
|
@ -264,6 +264,7 @@ func MustOpenStorage(path string, retention time.Duration, maxHourlySeries, maxD
|
||||||
} else {
|
} else {
|
||||||
nodeID := rand.Uint64()
|
nodeID := rand.Uint64()
|
||||||
s.nodeID = nodeID
|
s.nodeID = nodeID
|
||||||
|
s.mustSaveNodeID()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load indexdb
|
// Load indexdb
|
||||||
|
|
Loading…
Reference in a new issue