-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque #24500
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
Conversation
…e doubly-linked LBD
|
👋 Welcome back kabutz! A progress list of the required criteria for merging this PR into |
|
@kabutz 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 130 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@liach, @stuart-marks) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
FYI @kabutz you can log in to bugs.openjdk.org and create an issue for your patch. This issue can be noreg-doc, but will require a small CSR (which you can create and write, as you are already an author) as this touches specification text, for archival purpose. |
|
Hi @liach I found another mistake in the JavaDoc - it states "Linked nodes are dynamically created upon each insertion unless this would bring the deque above capacity." - however, in the LBD they do create the nodes even if we have reached capacity. This comment was copied over from LBQ, but is not strictly speaking correct for LBD. We could change the code to reflect the comment, or remove that sentence. Which way should we proceed? |
Actually scratch that - I'll propose a fix that seems to improve other issues as well. |
|
Added https://bugs.openjdk.org/browse/JDK-8354169 - not sure if that is what you meant @liach ? |
|
Yep, that's how we can create issues; we already have 8354111, you can close one of them as a duplicate of the other as we will just have one patch. /csr |
|
@liach JCheck configuration is invalid in the target branch of this pull request. Please issue this command again once the problem has been resolved. |
|
Ok, I've filled in the details for the CSR for 8354111. Sorry for all the additional work @liach |
|
Thanks! FYI the CSR requires a few more fields to be filled - see https://wiki.openjdk.org/display/csr/Fields+of+a+CSR+Request for details. You can click the "Edit" button on the CSR to see all those fields; many are not available in the browsing view. In addition, I think you can mention that this constant time is already the preexisting behavior and indicate there is no (minimal, "None" means the field is not filled) compatibility risk. Once you have filled all required or needed fields (In particular, don't forget about fix version of 25 and scope of SE), I can review the CSR and you can proceed to move it to "Finalized" (Click on the "Draft" button) |
|
This seems to date from JDK 6 when LBD was added. The list of methods in the class description that don't run in constant time isn't fully exhaustive, but doing a CSR would do no harm here. |
I assume this is a rare glitch in the bot. This PR has the csr label and is in a right state. |
Please let me know once I can set it to "Finalized". I hope I filled everything in correctly ... |
|
Thanks for going through this process; since there is no actual impact on all of source/target/behavioral compatibility you can uncheck all those. I have reviewed the CSR; you can finalize it now. After CSRs are finalized, the CSR lead (currently Joe Darcy) checks periodically and review the CSRs. It may take a few days. |
|
Joe Darcy has approved the CSR. Can we go ahead with integrating this PR? We might merge the other 4 PRs into a single one. |
liach
left a comment
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 good, This file has no copyright year so doesn't need a header update. @stuart-marks mind leaving an approval too since you have reviewed the CSR?
stuart-marks
left a comment
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.
LGTM
|
/integrate |
|
Thanks for the fix! /sponsor |
|
Going to push as commit c7b70a1.
Your commit was automatically rebased without conflicts. |
One of the features of the LinkedBlockingDeque is that it is a doubly-linked node queue, with pointers in each node to "prev" and "next", which allows remove() in the Iterator to remove the node in constant time. However, in the JavaDoc of the class, it lists Iterator.remove() as an example of a method that takes linear time.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24500/head:pull/24500$ git checkout pull/24500Update a local copy of the PR:
$ git checkout pull/24500$ git pull https://git.openjdk.org/jdk.git pull/24500/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24500View PR using the GUI difftool:
$ git pr show -t 24500Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24500.diff
Using Webrev
Link to Webrev Comment