netty5/codec-http2/src/main/java/io/netty/handler/codec/http2
Carsten Varming d6bf388343 Prevent nepotism with generational GCs.
Motivation:

If a single Encoder object is promoted to the old generation then every object
reachable from the promoted object will eventually be promoted as well. A queue
illustrates the problem very well. Say a sequence of inserts and deletions
generate an object graph:

   A -> B -> C -> D -> E -> F -> G -> H,

the head of the queue is E, the tail of the queue is H, and A, B, C, D are
dead. If all queue nodes are in the young generation, then a young gc will
clean up the object graph and leave us with:

   E -> F -> G -> H

on the other hand, if B and C were previously promoted to the old generation,
then a young collection assumes the refernece from C to D is from a live object
(this is a key result of generational gc, no need to mark the old generation).
Hence the young collection assumes the refence to D is a gc root and leave us
with the object graph:

   B-> C -> D -> E -> F -> G -> H.

Eventually D, E, F, G, H, and all queue nodes ever seen from this point on will
be promoted, regardless of their global live or dead status. It is generally
trivial to fix nepotism issues by simply breaking the reference chain after
dequeuing a node.

Currently Encoder objects do not null their references when removed from the
hash map. We have observed a 20X increase in promoted Encoder objects due to
nepotism.

Modifications:

Null before, after, and next fields when removing Encoder objects from maps.

Result:

Fewer promoted Encoder objects, fewer Encoder objects in the old generation,
shorter young collection times, old collections spaced further apart (nepotism
is just really bad). Enjoy.
2016-03-23 17:27:00 +01:00
..
hpack Prevent nepotism with generational GCs. 2016-03-23 17:27:00 +01:00
AbstractHttp2ConnectionHandlerBuilder.java AbstractHttp2ConnectionHandlerBuilder validateHeaders cannot be set with encoder/decoder 2016-01-29 00:33:45 -08:00
AbstractInboundHttp2ToHttpAdapterBuilder.java Revamp InboundHttp2ToHttpAdapter builder API 2015-12-18 12:44:46 +09:00
CharSequenceMap.java fixed "sensative" typo to read "sensitive" 2016-02-17 08:18:11 -08:00
CompressorHttp2ConnectionEncoder.java Deprecate PromiseAggregator 2016-03-14 10:53:30 -07:00
DecoratingHttp2ConnectionDecoder.java Http2ConnectionHandler Builder instead of constructors 2015-10-01 13:51:03 -07:00
DecoratingHttp2ConnectionEncoder.java Cleaning up the initialization of Http2ConnectionHandler 2015-03-30 11:23:02 -07:00
DecoratingHttp2FrameWriter.java Cleaning up the initialization of Http2ConnectionHandler 2015-03-30 11:23:02 -07:00
DefaultHttp2Connection.java HTTP/2 DefaultHttp2Connection NPE 2016-03-11 07:41:04 -08:00
DefaultHttp2ConnectionDecoder.java HTTP/2 Don't Flow Control Iniital Headers 2016-02-01 13:37:43 -08:00
DefaultHttp2ConnectionEncoder.java HTTP/2 DefaultHttp2ConnectionEncoder data frame size incorrect if error 2016-03-18 11:38:01 -07:00
DefaultHttp2FrameReader.java Allow to set Http2HeaderEncoder.SensitivityDetector in the Http2ConnectionHandler 2015-12-10 14:34:04 +01:00
DefaultHttp2FrameWriter.java HTTP/2 SimpleChannelPromiseAggregator don't fail fast 2016-03-14 11:00:21 -07:00
DefaultHttp2Headers.java HttpConversionUtil does not account for COOKIE compression 2015-12-08 20:00:31 -08:00
DefaultHttp2HeadersDecoder.java HTTP/2 DefaultHttp2HeadersDecoder weighted average error 2016-03-02 15:07:38 -08:00
DefaultHttp2HeadersEncoder.java Forking Twitter's hpack 2015-11-14 10:13:32 -08:00
DefaultHttp2HeaderTableListSize.java HTTP/2 Headers Type Updates 2015-10-30 15:29:44 -07:00
DefaultHttp2LocalFlowController.java Add HTTP/2 local flow control option for auto refill 2015-11-05 15:47:10 -08:00
DefaultHttp2RemoteFlowController.java HTTP/2 Don't Flow Control Iniital Headers 2016-02-01 13:37:43 -08:00
DelegatingDecompressorFrameListener.java Add HTTP/2 local flow control option for auto refill 2015-11-05 15:47:10 -08:00
EmptyHttp2Headers.java HTTP/2 Headers Type Updates 2015-10-30 15:29:44 -07:00
Http2ClientUpgradeCodec.java HTTP/2 defines using String instead of CharSequence 2015-09-16 14:55:33 -07:00
Http2CodecUtil.java HTTP/2 SimpleChannelPromiseAggregator don't fail fast 2016-03-14 11:00:21 -07:00
Http2Connection.java HTTP/2 codec may not always call Http2Connection.onStreamRemoved 2016-02-12 16:01:37 -08:00
Http2ConnectionAdapter.java Include error code and message in GOAWAY events. 2015-03-31 09:18:26 -07:00
Http2ConnectionDecoder.java Http2ConnectionHandler Builder instead of constructors 2015-10-01 13:51:03 -07:00
Http2ConnectionEncoder.java Cleaning up the initialization of Http2ConnectionHandler 2015-03-30 11:23:02 -07:00
Http2ConnectionHandler.java HTTP/2 ByteBufUtil.writeUtf8 cleanup 2016-03-11 14:24:45 -08:00
Http2ConnectionHandlerBuilder.java Revamp the Http2ConnectionHandler builder API 2015-12-17 14:08:13 +09:00
Http2DataWriter.java Allow HTTP2 frame writer to accept arbitrarily large frames 2015-11-24 11:44:06 -08:00
Http2Error.java InboundHttp2ToHttpAdapter leak and logic improvements 2016-02-01 12:38:40 -08:00
Http2EventAdapter.java Include error code and message in GOAWAY events. 2015-03-31 09:18:26 -07:00
Http2Exception.java HTTP/2 Graceful Shutdown Timeout 2015-08-20 13:27:18 -07:00
Http2Flags.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2FlowController.java HTTP/2 Flow Controller should use Channel.isWritable() 2015-07-16 14:38:48 -07:00
Http2FrameAdapter.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2FrameListener.java Fix errors reported by javadoc 2015-12-27 08:36:45 +01:00
Http2FrameListenerDecorator.java HTTP/2 Decoder reduce preface conditional checks 2015-03-28 18:52:35 -07:00
Http2FrameLogger.java Log the current channel in Http2FrameLogger 2016-01-18 10:52:08 +01:00
Http2FrameReader.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2FrameSizePolicy.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2FrameTypes.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2FrameWriter.java Http2DefaultFrameWriter direct write instead of copy 2015-02-06 11:56:14 -08:00
Http2Headers.java HTTP/2 Headers Type Updates 2015-10-30 15:29:44 -07:00
Http2HeadersDecoder.java HTTP/2 limit header accumulated size 2015-07-07 13:25:03 -07:00
Http2HeadersEncoder.java Add Http2HeadersEncoder.ALWAYS_SENSITIVE instance 2015-12-10 12:59:04 +01:00
Http2HeaderTable.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2InboundFrameLogger.java Log the current channel in Http2FrameLogger 2016-01-18 10:52:08 +01:00
Http2LifecycleManager.java No HTTP/2 RST_STREAM if no prior HEADERS were sent 2015-11-25 13:46:32 -08:00
Http2LocalFlowController.java Add HTTP/2 local flow control option for auto refill 2015-11-05 15:47:10 -08:00
Http2NoMoreStreamIdsException.java HTTP/2 Graceful Shutdown Timeout 2015-08-20 13:27:18 -07:00
Http2OutboundFrameLogger.java Log the current channel in Http2FrameLogger 2016-01-18 10:52:08 +01:00
Http2PromisedRequestVerifier.java Http2 draft 17 2015-03-25 09:02:15 -07:00
Http2RemoteFlowController.java HTTP/2 Don't Flow Control Iniital Headers 2016-02-01 13:37:43 -08:00
Http2SecurityUtil.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
Http2ServerUpgradeCodec.java Change HttpServerUpgradeHandler.UpgradeCodec to allow aborting upgrade 2016-03-18 17:01:59 +01:00
Http2Settings.java Make IntObjectHashMap extend Map 2015-07-22 15:52:27 -07:00
Http2Stream.java HTTP/2 DefaultHttp2Connection NPE 2016-03-11 07:41:04 -08:00
Http2StreamVisitor.java Removing direct access to HTTP/2 child streams. 2015-04-10 08:52:26 -07:00
HttpConversionUtil.java Use ByteBufAllocator to allocate ByteBuf for FullHttpMessage Motivation: When converting SPDY or HTTP/2 frames to HTTP/1.x, netty always used an unpooled heap ByteBuf. 2016-02-17 19:55:52 -08:00
HttpToHttp2ConnectionHandler.java HTTP/2 SimpleChannelPromiseAggregator don't fail fast 2016-03-14 11:00:21 -07:00
HttpToHttp2ConnectionHandlerBuilder.java Revamp the Http2ConnectionHandler builder API 2015-12-17 14:08:13 +09:00
InboundHttp2ToHttpAdapter.java Use ByteBufAllocator to allocate ByteBuf for FullHttpMessage Motivation: When converting SPDY or HTTP/2 frames to HTTP/1.x, netty always used an unpooled heap ByteBuf. 2016-02-17 19:55:52 -08:00
InboundHttp2ToHttpAdapterBuilder.java Revamp InboundHttp2ToHttpAdapter builder API 2015-12-18 12:44:46 +09:00
InboundHttp2ToHttpPriorityAdapter.java Use ByteBufAllocator to allocate ByteBuf for FullHttpMessage Motivation: When converting SPDY or HTTP/2 frames to HTTP/1.x, netty always used an unpooled heap ByteBuf. 2016-02-17 19:55:52 -08:00
InboundHttp2ToHttpPriorityAdapterBuilder.java Revamp InboundHttp2ToHttpAdapter builder API 2015-12-18 12:44:46 +09:00
package-info.java Back port HTTP/2 codec from master to 4.1 2015-01-23 11:06:11 -05:00
StreamBufferingEncoder.java HTTP/2 Headers Type Updates 2015-10-30 15:29:44 -07:00
StreamByteDistributor.java Fix javadoc links and tags 2015-12-26 08:34:31 +01:00
UniformStreamByteDistributor.java HTTP/2 DefaultHttp2ConnectionEncoder data frame size incorrect if error 2016-03-18 11:38:01 -07:00
WeightedFairQueueByteDistributor.java Fix errors reported by javadoc 2015-12-27 08:36:45 +01:00