Merge pull request #6651 from influxdata/jl-close-race
Fix loop variable reuse in database closepull/6647/head
commit
046561181c
|
@ -20,6 +20,7 @@
|
|||
- [#6607](https://github.com/influxdata/influxdb/issues/6607): SHOW TAG VALUES accepts != and !~ in WHERE clause.
|
||||
- [#6649](https://github.com/influxdata/influxdb/issues/6649): Make sure admin exists before authenticating query.
|
||||
- [#6644](https://github.com/influxdata/influxdb/issues/6644): Print the query executor's stack trace on a panic to the log.
|
||||
- [#6650](https://github.com/influxdata/influxdb/issues/6650): Data race when dropping a database immediately after writing to it
|
||||
|
||||
## v0.13.0 [2016-05-12]
|
||||
|
||||
|
|
|
@ -375,11 +375,12 @@ func (s *Store) DeleteDatabase(name string) error {
|
|||
for shardID, sh := range s.shards {
|
||||
if sh.database == name {
|
||||
wg.Add(1)
|
||||
go func(shardID uint64) {
|
||||
shardID, sh := shardID, sh // scoped copies of loop variables
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
err := sh.Close()
|
||||
responses <- resp{shardID, err}
|
||||
}(shardID)
|
||||
}()
|
||||
}
|
||||
}
|
||||
s.mu.RUnlock()
|
||||
|
|
Loading…
Reference in New Issue