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] Fix concurrent containers concurrency issue #22604
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22604 +/- ##
============================================
+ Coverage 73.57% 73.96% +0.38%
- Complexity 32624 33148 +524
============================================
Files 1877 1885 +8
Lines 139502 140543 +1041
Branches 15299 15431 +132
============================================
+ Hits 102638 103946 +1308
+ Misses 28908 28563 -345
- Partials 7956 8034 +78
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reporting the issue and starting the work to fix this issue.
Catching the exception would be the preferred solution since there's no point of using a StampedLock unless optimistic locking is used.
I think that we had this same bug discussed years ago, but for some reason we didn't fix this.
@lhotari Is there any discuss thread links? I don't see any discuss linked to the origin PRs. |
Perhaps in #18390 |
Found it: #18390 (comment) . @thetumbled had originally made a PR to catch IndexOutOfBoundsException, which I think is the correct solution. |
Oh, I see, it looks like introduced local variables to avoid ArrayIndexOutOfBoundsExeception, I did't read it carefully, it makes sense, we can sync #18390 to bookkeeper. |
Fixes #22603
Motivation
Fix concurrent containers concurrency issue
Modifications
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: