On Fri, 14 Nov 2025 13:06:48 GMT, Daniel Fuchs <[email protected]> wrote:

>> src/java.net.http/share/classes/jdk/internal/net/http/quic/QuicCubicCongestionController.java
>>  line 129:
>> 
>>> 127:             }
>>> 128:             if (targetBytes > congestionWindow) {
>>> 129:                 congestionWindow += Math.max((targetBytes - 
>>> congestionWindow) * packetBytes / congestionWindow, 1L);
>> 
>> Can `(targetBytes - congestionWindow) * packetBytes / congestionWindow` 
>> overflow?
>
> Should we assert that congestionWindow is >= minimumWindow after this 
> operation?

It cannot overflow when used correctly (i.e. when packetBytes < 
congestionWindow, and congestionWindow < 2 * MAX_BYTES_IN_FLIGHT).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28195#discussion_r2533924596

Reply via email to