uber / tchannel-java

A Java implementation of the TChannel protocol.
MIT License
134 stars 65 forks source link

Added option to force Heap Buffer for headers #211

Closed denyska closed 4 years ago

denyska commented 4 years ago

Rationale.

            request = new ThriftRequest.Builder<KeyValue.setValue_args>("keyvalue-service", "KeyValue::setValue")
                    .setTimeout(1000)
                    .setBody(setValue)
                    .build();
            // do something else that results in the error
            subChannel.send(request);

Meaning if there is an error between ThriftRequest / ThriftResponse constructed and it handed over to tchannel, then Memory will leak. Instead of fixing all of usages, we can take small performance hit (see next bullet).

codecov[bot] commented 4 years ago

Codecov Report

Merging #211 into master will decrease coverage by 0.19%. The diff coverage is 62.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #211      +/-   ##
============================================
- Coverage     73.56%   73.37%   -0.19%     
  Complexity       10       10              
============================================
  Files            87       87              
  Lines          2753     2760       +7     
  Branches        345      348       +3     
============================================
  Hits           2025     2025              
- Misses          506      509       +3     
- Partials        222      226       +4
Impacted Files Coverage Δ Complexity Δ
...a/com/uber/tchannel/messages/ThriftSerializer.java 76.47% <62.5%> (-5.01%) 0 <0> (ø)
...java/com/uber/tchannel/handlers/RequestRouter.java 72.48% <0%> (-3.67%) 0% <0%> (ø)
...ava/com/uber/tchannel/handlers/ResponseRouter.java 80.23% <0%> (ø) 0% <0%> (ø) :arrow_down:

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 1efee75...a029440. Read the comment docs.