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

bugfix: netty memory leak #1333

Merged
merged 5 commits into from
Jul 23, 2019
Merged

bugfix: netty memory leak #1333

merged 5 commits into from
Jul 23, 2019

Conversation

cmonkey
Copy link
Contributor

@cmonkey cmonkey commented Jul 22, 2019

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

fix #1304 #1318

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jul 22, 2019

Codecov Report

Merging #1333 into develop will increase coverage by 0.15%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1333      +/-   ##
=============================================
+ Coverage      48.47%   48.63%   +0.15%     
  Complexity      1645     1645              
=============================================
  Files            332      332              
  Lines          11503    11534      +31     
  Branches        1391     1428      +37     
=============================================
+ Hits            5576     5609      +33     
- Misses          5292     5302      +10     
+ Partials         635      623      -12
Impacted Files Coverage Δ Complexity Δ
.../io/seata/core/rpc/netty/v1/ProtocolV1Decoder.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 84.61% <0%> (-0.61%) 67% <0%> (ø)
...a/io/seata/core/rpc/netty/AbstractRpcRemoting.java 9.95% <0%> (-0.21%) 3% <0%> (ø)
...n/java/io/seata/rm/datasource/ConnectionProxy.java 9.52% <0%> (-0.12%) 4% <0%> (ø)
...tobuf/convertor/BranchCommitResponseConvertor.java 97.43% <0%> (+0.06%) 3% <0%> (ø) ⬇️
...in/java/io/seata/server/session/BranchSession.java 78.19% <0%> (+0.07%) 41% <0%> (ø) ⬇️
...buf/convertor/BranchRollbackResponseConvertor.java 97.36% <0%> (+0.07%) 3% <0%> (ø) ⬇️
...buf/convertor/GlobalRollbackResponseConvertor.java 97.05% <0%> (+0.08%) 3% <0%> (ø) ⬇️
...tobuf/convertor/GlobalStatusResponseConvertor.java 97.05% <0%> (+0.08%) 3% <0%> (ø) ⬇️
...tobuf/convertor/GlobalCommitResponseConvertor.java 97.05% <0%> (+0.08%) 3% <0%> (ø) ⬇️
... and 16 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 2cc8f36...7c12d0a. Read the comment docs.

@cmonkey cmonkey mentioned this pull request Jul 22, 2019
1 task
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

ByteBuf frame = (ByteBuf) decoded;
return decodeFrame(frame);
}catch(Exception e){
throw e;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please print some log

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job.

}catch(Exception e){
throw e;
}finally {
in.release();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not release in but frame

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree,in can be released in ByteToMessageDecoder.channelRead, but frame allocate in LengthFieldBasedFrameDecoder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change frame.release and add error logger

@slievrly slievrly changed the title bugfix: Netty memory leak (#1304) (#1318) bugfix: netty memory leak Jul 23, 2019
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.

Netty memory leak
7 participants