Merge pull request #425 from prometheus/fix/series-file-name

Fix embarrassing bug in crash recovery.
pull/426/head
Björn Rabenstein 10 years ago
commit c4bcfeccc5

@ -263,11 +263,12 @@ func (p *persistence) setDirty(dirty bool) {
// safe. Only call before anything else is running (except index processing
// queue as started by newPersistence).
func (p *persistence) recoverFromCrash(fingerprintToSeries map[clientmodel.Fingerprint]*memorySeries) error {
// TODO(beorn): We need proper tests for the crash recovery.
glog.Warning("Starting crash recovery. Prometheus is inoperational until complete.")
fpsSeen := map[clientmodel.Fingerprint]struct{}{}
count := 0
seriesDirNameFmt := fmt.Sprintf("0%dx", seriesDirNameLen)
seriesDirNameFmt := fmt.Sprintf("%%0%dx", seriesDirNameLen)
glog.Info("Scanning files.")
for i := 0; i < 1<<(seriesDirNameLen*4); i++ {

Loading…
Cancel
Save