Merge pull request #143 from prometheus/julius-fix-drain

Stop serving tiered storage after draining it.
This commit is contained in:
Matt T. Proud 2013-04-15 04:35:49 -07:00
commit 7267b76d93
2 changed files with 2 additions and 3 deletions

View file

@ -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
} }
} }
} }

View file

@ -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()
} }
} }