Skip to content

Commit

Permalink
remove shards from server memory
Browse files Browse the repository at this point in the history
  • Loading branch information
corylanou committed Apr 23, 2015
1 parent c27953a commit 022cb62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,12 @@ func (s *Server) applyDeleteShardGroup(m *messaging.Message) (err error) {
s.stats.Add("shardsDeleted", int64(len(g.Shards)))
return tx.saveDatabase(db)
})

// remove from lookups.
for _, sh := range g.Shards {
delete(s.shards, sh.ID)
}

return
}

Expand Down

0 comments on commit 022cb62

Please sign in to comment.