Skip to content

Commit

Permalink
Fix statsd concurrency bug (influxdata#8885)
Browse files Browse the repository at this point in the history
* Fix the issue

* Remove test I was using for replication

* Accidentally removed test.

* Add lock only where it is necessary.

* eliminate unnecessary space
  • Loading branch information
ivorybilled authored Feb 25, 2021
1 parent c0ffb20 commit ae1e54c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/inputs/statsd/statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,8 @@ func (s *Statsd) parseStatsdLine(line string) error {
// map of tags.
// Return values are (<name>, <field>, <tags>)
func (s *Statsd) parseName(bucket string) (string, string, map[string]string) {
s.Lock()
defer s.Unlock()
tags := make(map[string]string)

bucketparts := strings.Split(bucket, ",")
Expand Down

0 comments on commit ae1e54c

Please sign in to comment.