8347373: HTTP/2 flow control checks may count unprocessed data twice#23018
8347373: HTTP/2 flow control checks may count unprocessed data twice#23018dfuch wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into |
|
@dfuch 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 50 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 |
Webrevs
|
| private boolean checkWindowSizeExceeded(long len) { | ||
| private boolean checkWindowSizeExceeded(long received, long len) { | ||
| // because windowSize is bound by Integer.MAX_VALUE | ||
| // we will never reach the point where received.get() + len |
There was a problem hiding this comment.
Nit - the method param received shadows the class level field and the comment that says "received.get()" would need to be reworded too. It might be better to rename the method param to something else.
There was a problem hiding this comment.
I guess I could rename it to processed.
| int tosend = (int)Math.min(received.get(), Integer.MAX_VALUE); | ||
| if (tosend > limit) { | ||
| received.getAndAdd(-tosend); | ||
| received.addAndGet(-tosend); |
There was a problem hiding this comment.
I'm guessing the change on this line is to merely be consistent with some others parts of the code in this class? Semantically, both these methods would be the same since we don't use the return value.
There was a problem hiding this comment.
yes - I had added some println when debugging for which it was more convenient to call addAndGet than getAndAdd. As you say it's the same so I left it.
jaikiran
left a comment
There was a problem hiding this comment.
The updated changes look good to me.
|
/integrate |
|
Going to push as commit 0612636.
Your commit was automatically rebased without conflicts. |
The HTTP/2 flow control logic has a potential race condition where some of the unprocessed data may be counted twice for the connection window.
A protocol exception may be raised incorrectly if there are several concurrent streams producing data and the connection window is close from being exhausted.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23018/head:pull/23018$ git checkout pull/23018Update a local copy of the PR:
$ git checkout pull/23018$ git pull https://git.openjdk.org/jdk.git pull/23018/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23018View PR using the GUI difftool:
$ git pr show -t 23018Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23018.diff
Using Webrev
Link to Webrev Comment