Merge pull request #7441 from influxdata/mr-speedup-shutdown

Speed up shutdown
pull/7443/head
Mark Rushakoff 2016-10-10 09:34:49 -07:00 committed by GitHub
commit 89c7572dd6
2 changed files with 7 additions and 4 deletions

View File

@ -17,6 +17,7 @@
- [#7305](https://github.com/influxdata/influxdb/pull/7305): UDP Client: Split large points. Thanks @vlasad
- [#7115](https://github.com/influxdata/influxdb/issues/7115): Feature request: `influx inspect -export` should dump WAL files.
- [#7388](https://github.com/influxdata/influxdb/pull/7388): Implement cumulative_sum() function.
- [#7441](https://github.com/influxdata/influxdb/pull/7441): Speed up shutdown by closing shards concurrently.
### Bugfixes

View File

@ -229,11 +229,13 @@ func (s *Store) Close() error {
}
s.wg.Wait()
for _, sh := range s.shards {
if err := sh.Close(); err != nil {
return err
}
// Close all the shards in parallel.
if err := s.walkShards(s.shardsSlice(), func(sh *Shard) error {
return sh.Close()
}); err != nil {
return err
}
s.opened = false
s.shards = nil
s.databaseIndexes = nil