-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8307091: A few client tests intermittently throw ConcurrentModificationException #13783
Conversation
👋 Welcome back tr! A progress list of the required criteria for merging this PR into |
@TejeshR13 The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
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.
Looks reasonable. Fix the formatting I noted
|
||
if (start >= 0 && end > start) { | ||
List<File> listEnd_OldSize = new Vector<>(fileCache.subList(end, oldSize)); | ||
if(listEnd_OldSize.equals(newFileCache.subList(start, newSize))) { |
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.
if( -> "if ("
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.
Updated.
PS update the PR summary to match the revised JBS one - |
Looks like there's a title mismatch blocking you from integrating but changes LGTM. |
@TejeshR13 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 674 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 465bdd9.
Your commit was automatically rebased without conflicts. |
@TejeshR13 Pushed as commit 465bdd9. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
return null; | ||
|
||
if (start >= 0 && end > start) { | ||
List<File> listStart_OldSize = new Vector<>(fileCache.subList(start, oldSize)); |
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.
Why Vector was used instead of ArrayList ?
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.
Nothing specific reason why I choose vector apart from the main object is of Vector type and since in this context (where both the objects are not shared) both Vector/Arraylist comparison remains same. Does Arraylist comparison has any advantage here?
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.
I already looked at this and Vector is what this class uses already and there's no reason to be different and definitely no reason to change the rest.
Few test are throwing Concurrent Modification Exception Intermittently. Since the issue is intermittent and from the log and code review, It is found that the shared variable
fileCache
is used in comparison with thenewFileCache
where the comparison invokes the iterator method in AbstractList class. Since based on vector documentation it was evident that listIterator are fail-fast iterators and hence it would be better to make a separate local copy of vectors for comparing operations.The same is implemented and tested in CI system which shows green.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13783/head:pull/13783
$ git checkout pull/13783
Update a local copy of the PR:
$ git checkout pull/13783
$ git pull https://git.openjdk.org/jdk.git pull/13783/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13783
View PR using the GUI difftool:
$ git pr show -t 13783
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13783.diff
Webrev
Link to Webrev Comment