Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ByteBuf memory leaks, race conditions, corner case error handling #48

Merged
merged 2 commits into from
Apr 20, 2017

Conversation

nicmunroe
Copy link
Member

This should fix the following:

  • No more Netty ByteBuf reference counting memory leaks. If you saw any log messages that looked like LEAK: ByteBuf.release() was not called before it's garbage-collected then this should fix that.
  • No more (rare) race conditions when processing ProxyRouterEndpoint requests that could lead to requests not being handled correctly.
  • Better internal corner-case error handling for ProxyRouterEndpoint requests, leading to less log spam warnings.
  • Improved logging when corner case errors do pop up. If a request is handled in an unexpected way and you have the trace ID from the response headers, then the logs should give you better insight into what happened (i.e. caller or downstream system dropping connection partway through a request).

@codecov-io
Copy link

codecov-io commented Apr 20, 2017

Codecov Report

Merging #48 into master will decrease coverage by 0.24%.
The diff coverage is 74.18%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #48      +/-   ##
============================================
- Coverage     90.61%   90.37%   -0.25%     
- Complexity     1899     1947      +48     
============================================
  Files           141      141              
  Lines          5573     5797     +224     
  Branches        726      765      +39     
============================================
+ Hits           5050     5239     +189     
- Misses          348      379      +31     
- Partials        175      179       +4
Impacted Files Coverage Δ Complexity Δ
...e/riposte/server/handler/RequestFilterHandler.java 100% <ø> (+2.04%) 21 <0> (+1) ⬆️
...oste/metrics/codahale/CodahaleMetricsListener.java 100% <100%> (ø) 39 <0> (ø) ⬇️
...poste/server/handler/RequestInfoSetterHandler.java 100% <100%> (+9.37%) 20 <10> (+4) ⬆️
...r/handler/NonblockingEndpointExecutionHandler.java 100% <100%> (+5.35%) 28 <13> (+4) ⬆️
...n/java/com/nike/riposte/util/AsyncNettyHelper.java 100% <100%> (ø) 48 <0> (+1) ⬆️
...nike/riposte/server/http/impl/RequestInfoImpl.java 100% <100%> (ø) 69 <4> (+5) ⬆️
...rver/handler/IncompleteHttpCallTimeoutHandler.java 100% <100%> (ø) 7 <4> (+2) ⬆️
...iposte/server/http/ProxyRouterProcessingState.java 94.11% <100%> (+7.45%) 13 <2> (+2) ⬆️
...poste/server/handler/ExceptionHandlingHandler.java 100% <100%> (+4.61%) 27 <0> (+2) ⬆️
...erver/handler/ChannelPipelineFinalizerHandler.java 100% <100%> (+7.69%) 41 <20> (+23) ⬆️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b5afbf...a74fdfa. Read the comment docs.

@nicmunroe nicmunroe merged commit 020c080 into Nike-Inc:master Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants