Merge pull request #312 from prometheus/fix/sample-append-logging
Log correct sample count when appending to disk.
This commit is contained in:
commit
81c406630a
|
@ -269,17 +269,17 @@ func (t *TieredStorage) flushMemory(ttl time.Duration) {
|
||||||
|
|
||||||
queueLength := len(t.appendToDiskQueue)
|
queueLength := len(t.appendToDiskQueue)
|
||||||
if queueLength > 0 {
|
if queueLength > 0 {
|
||||||
log.Printf("Writing %d samples ...", queueLength)
|
|
||||||
samples := model.Samples{}
|
samples := model.Samples{}
|
||||||
for i := 0; i < queueLength; i++ {
|
for i := 0; i < queueLength; i++ {
|
||||||
chunk := <-t.appendToDiskQueue
|
chunk := <-t.appendToDiskQueue
|
||||||
samples = append(samples, chunk...)
|
samples = append(samples, chunk...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("Writing %d samples...", len(samples))
|
||||||
t.DiskStorage.AppendSamples(samples)
|
t.DiskStorage.AppendSamples(samples)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("Done flushing...")
|
log.Println("Done flushing.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TieredStorage) Close() {
|
func (t *TieredStorage) Close() {
|
||||||
|
|
Loading…
Reference in New Issue