mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-28 15:09:39 -08:00
Merge pull request #143 from prometheus/julius-fix-drain
Stop serving tiered storage after draining it.
This commit is contained in:
commit
7267b76d93
|
@ -179,7 +179,7 @@ func (t *tieredStorage) Serve() {
|
||||||
case drainingDone := <-t.draining:
|
case drainingDone := <-t.draining:
|
||||||
t.flush()
|
t.flush()
|
||||||
drainingDone <- true
|
drainingDone <- true
|
||||||
break
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,7 +370,6 @@ func testMakeView(t test.Tester) {
|
||||||
|
|
||||||
for i, scenario := range scenarios {
|
for i, scenario := range scenarios {
|
||||||
tiered, closer := newTestTieredStorage(t)
|
tiered, closer := newTestTieredStorage(t)
|
||||||
defer closer.Close()
|
|
||||||
|
|
||||||
for j, datum := range scenario.data {
|
for j, datum := range scenario.data {
|
||||||
err := tiered.AppendSample(datum)
|
err := tiered.AppendSample(datum)
|
||||||
|
@ -418,7 +417,7 @@ func testMakeView(t test.Tester) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tiered.Drain()
|
closer.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue