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

Coverity - RestartingMemberIterator uses volatile field #11750

Closed
kwart opened this issue Nov 9, 2017 · 3 comments
Closed

Coverity - RestartingMemberIterator uses volatile field #11750

kwart opened this issue Nov 9, 2017 · 3 comments

Comments

@kwart
Copy link
Contributor

@kwart kwart commented Nov 9, 2017

Field retryCounter is not atomically updated in the RestartingMemberIterator.retry(Set) method.

https://scan4.coverity.com/reports.htm#v32322/p13030/fileInstanceId=29221847&defectInstanceId=5757129&mergedDefectId=202210

@kwart kwart self-assigned this Nov 9, 2017
@Donnerbart
Copy link
Contributor

@Donnerbart Donnerbart commented Nov 9, 2017

FindBugs would also complain about this, but there is a suppression with a justification for this one:

    @SuppressFBWarnings(value = "VO_VOLATILE_INCREMENT",
            justification = "retryCounter is accessed by multiple threads, but never concurrently")

It has been added by @jerrinot, so maybe he can confirm this here.

@kwart
Copy link
Contributor Author

@kwart kwart commented Nov 9, 2017

Thanks @Donnerbart for letting me know. Coverity reports more of these problems. I'll look for the @SuppressFBWarnings annotation next time and mark such records as false positives in the coverity.

@Donnerbart
Copy link
Contributor

@Donnerbart Donnerbart commented Nov 9, 2017

I think it's good to re-evaluate these things from time to time. The circumstances may have changed, so I guess it's better to double check than to miss something.

Donnerbart added a commit to Donnerbart/hazelcast that referenced this issue Nov 9, 2017
@mmedenjak mmedenjak added this to the 3.10 milestone Nov 10, 2017
Donnerbart added a commit that referenced this issue Nov 14, 2017
…ator

Cleanup of RestartingMemberIterator (#11750)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.