Skip to content

Unneeded(?) mutex lock in ExponentialBackoff #499

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

Closed
utrack opened this issue Mar 29, 2017 · 2 comments
Closed

Unneeded(?) mutex lock in ExponentialBackoff #499

utrack opened this issue Mar 29, 2017 · 2 comments

Comments

@utrack
Copy link
Contributor

utrack commented Mar 29, 2017

Hi!

I was skimming through the code and found an odd piece @ https://github.com/olivere/elastic/blob/v2.0.58/backoff.go#L89

I can't find any writes happening to b in this section. Either something was forgotten or we just don't need that mutex.

@olivere
Copy link
Owner

olivere commented Mar 29, 2017

Yep. Looks like it got copied over from a previous version of ExponentialBackoff and could be removed.

olivere added a commit that referenced this issue Apr 10, 2017
olivere added a commit that referenced this issue Apr 10, 2017
olivere added a commit that referenced this issue Apr 10, 2017
@olivere
Copy link
Owner

olivere commented Apr 10, 2017

This issue will be fixed in the next release of v2, v3, and v5.

@olivere olivere closed this as completed Apr 10, 2017
dylannz pushed a commit to HomesNZ/elastic that referenced this issue Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants