Remove engine on close

pull/5514/head
Edward Robinson 2016-02-02 15:33:20 +00:00 committed by Edd Robinson
parent 0fd8392853
commit c7bbe6ef17
2 changed files with 9 additions and 3 deletions

View File

@ -38,6 +38,7 @@
- [#5479](https://github.com/influxdata/influxdb/issues/5479): Bringing up a node as a meta only node causes panic
- [#5504](https://github.com/influxdata/influxdb/issues/5475): create retention policy on unexistant DB crash InfluxDB
- [#5505](https://github.com/influxdata/influxdb/issues/5505): Clear authCache in meta.Client when password changes.
- [#5244](https://github.com/influxdata/influxdb/issues/5244): panic: ensure it's safe to close engine multiple times.
## v0.9.6 [2015-12-09]

View File

@ -146,10 +146,15 @@ func (s *Shard) Close() error {
}
func (s *Shard) close() error {
if s.engine != nil {
return s.engine.Close()
if s.engine == nil {
return nil
}
return nil
err := s.engine.Close()
if err == nil {
s.engine = nil
}
return err
}
// DiskSize returns the size on disk of this shard