Clone
 

zhangduo <zhangduo@wandoujia.com> in Netty

Remove PriorityStreamByteDistributor from http2 microbench

Motivation:

PriorityStreamByteDistributor has been removed but NoPriorityByteDistributionBenchmark in microbench still need it and causes compile error

Modifications:

Remove PriorityStreamByteDistributor from NoPriorityByteDistributionBenchmark

Result:

The compile error has been fixed

Clear selectedKeys in OioSctpChannel.doReadMessages

Motivation:

The fix for https://github.com/netty/netty/issues/3884 breaks SctpEchoTest because Selector.select will always return 0 if you do not clear last selectedKeys.

Modifications:

Clear readSelector.selectedKeys() if it is not empty.

Result:

SctpEchoTest is green again.

Clear selectedKeys in OioSctpChannel.doReadMessages

Motivation:

The fix for https://github.com/netty/netty/issues/3884 breaks SctpEchoTest because Selector.select will always return 0 if you do not clear last selectedKeys.

Modifications:

Clear readSelector.selectedKeys() if it is not empty.

Result:

SctpEchoTest is green again.

Allow numBytes == 0 when calling Http2LocalFlowController.consumeBytes.

Motivation:

Sometimes people use a data frame with length 0 to end a stream(such as jetty http2-server). So it is possible that data.readableBytes and padding are all 0 for a data frame, and cause an IllegalArgumentException when calling flowController.consumeBytes.

Modifications:

Return false when numBytes == 0 instead of throwing IllegalArgumentException.

Result:

Fix IllegalArgumentException.

Allow numBytes == 0 when calling Http2LocalFlowController.consumeBytes.

Motivation:

Sometimes people use a data frame with length 0 to end a stream(such as jetty http2-server). So it is possible that data.readableBytes and padding are all 0 for a data frame, and cause an IllegalArgumentException when calling flowController.consumeBytes.

Modifications:

Return false when numBytes == 0 instead of throwing IllegalArgumentException.

Result:

Fix IllegalArgumentException.