Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate TrackingIDs returned #6960

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

asgaut
Copy link
Contributor

@asgaut asgaut commented Jan 31, 2020

There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.
@asgaut
Copy link
Contributor Author

asgaut commented Jan 31, 2020

I see the same bug exists in the newTrackingID() function in accumulator.go.

@danielnelson danielnelson added area/agent fix pr to fix corresponding bug labels Jan 31, 2020
@danielnelson danielnelson added this to the 1.13.3 milestone Jan 31, 2020
@danielnelson danielnelson merged commit 9823952 into influxdata:master Jan 31, 2020
@danielnelson
Copy link
Contributor

Nice catch, I'll get the other instance of the bug and also do a quick audit over our other uses of atomic.

@danielnelson danielnelson mentioned this pull request Jan 31, 2020
3 tasks
danielnelson pushed a commit that referenced this pull request Feb 4, 2020
There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.

(cherry picked from commit 9823952)
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants