> Mark, > > On 5/30/19 08:39, ma...@apache.org wrote: >> This is an automated email from the ASF dual-hosted git >> repository. > >> markt pushed a commit to branch master in repository >> https://gitbox.apache.org/repos/asf/tomcat.git > > >> The following commit(s) were added to refs/heads/master by this >> push: new 0bebe66 Additional h2 concurrency / timeout fix 0bebe66 >> is described below > >> commit 0bebe66d921072a3423cece63f3c2f8787d0342c Author: Mark Thomas >> <ma...@apache.org> AuthorDate: Thu May 30 13:39:05 2019 +0100 > >> Additional h2 concurrency / timeout fix --- >> .../apache/coyote/http2/Http2UpgradeHandler.java | 37 >> ++++++++++++++++++---- 1 file changed, 30 insertions(+), 7 >> deletions(-) > >> diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java >> b/java/org/apache/coyote/http2/Http2UpgradeHandler.java index >> 880d365..4ecb642 100644 --- >> a/java/org/apache/coyote/http2/Http2UpgradeHandler.java +++ >> b/java/org/apache/coyote/http2/Http2UpgradeHandler.java @@ -133,6 >> +133,24 @@ class Http2UpgradeHandler extends AbstractStream >> implements InternalHttpUpgradeH private final PingManager >> pingManager = getPingManager(); private volatile int >> newStreamsSinceLastPrune = 0; // Tracking for when the connection >> is blocked (windowSize < 1) + // The int array must have 3 >> elements. There are: + // [0] - The number of bytes the Stream >> requires from the connection + // window. This excludes >> any allocation that has already been made. + // [1] - The >> number of bytes that has been allocated from the connection + // >> window. This excludes any bytes that have been written since the + >> // allocation was made. + // [2] - 1 if the stream >> thread has been notified that an allocation has + // >> been made but has not yet consumed that allocation. 0 in all + >> // other cases. The purpose of this is to avoid the >> incorrect + // triggering of a timeout for the following >> sequence of events: + // window update 1 + // >> allocation 1 + // notify 1 + // window update >> 2 + // allocation 2 + // act on notify 1 >> (using allocation 1 and 2) + // notify 2 + // >> act on notify 2 (timeout due to no allocation) > > Maybe it's time for a real class instead of an int array that requires > a half-page of documentation. We may still require the half-page of > documentation, but using an int[] here seems like less and less of a > good idea. > > Binding the documentation to a class would be more readable, > especially in an IDE where you can get javadoc for a method / class > easily without even opening the file.
Fair point. I'll take a look at that. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org