Remove the shard references when database is dropped

The shards map still held a reference to a shard that was dropped
which caused the periodic mainteance task to report errors continuously.
pull/4580/head
Jason Wilder 2015-10-26 13:04:57 -06:00
parent 4d277e7772
commit 9046244df3
1 changed files with 2 additions and 0 deletions

View File

@ -155,7 +155,9 @@ func (s *Store) DeleteDatabase(name string, shardIDs []uint64) error {
if shard != nil {
shard.Close()
}
delete(s.shards, id)
}
if err := os.RemoveAll(filepath.Join(s.path, name)); err != nil {
return err
}