Skip to content

[#1391] fix(server): Direct memory may leak in exceptional scenarios in shuffle server. - #1392

Merged
zuston merged 1 commit into
apache:masterfrom
rickyma:potential-mem-leak
Dec 25, 2023
Merged

[#1391] fix(server): Direct memory may leak in exceptional scenarios in shuffle server.#1392
zuston merged 1 commit into
apache:masterfrom
rickyma:potential-mem-leak

Conversation

@rickyma

@rickyma rickyma commented Dec 22, 2023

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Release the direct memory in the finally block to prevent memory leaks.

Why are the changes needed?

For #1391

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By running server successfully.

@rickyma

rickyma commented Dec 22, 2023

Copy link
Copy Markdown
Contributor Author

PTAL @zuston @jerqi

@rickyma rickyma changed the title [#1391] [Bug] Direct memory may leak in exceptional scenarios in shuffle server. [#1391] fix(server): Direct memory may leak in exceptional scenarios in shuffle server. Dec 22, 2023
@codecov-commenter

codecov-commenter commented Dec 22, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (386f795) 53.21% compared to head (e4b6d3a) 54.12%.

Files Patch % Lines
...niffle/server/netty/ShuffleServerNettyHandler.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1392      +/-   ##
============================================
+ Coverage     53.21%   54.12%   +0.90%     
- Complexity     2719     2720       +1     
============================================
  Files           419      399      -20     
  Lines         23989    21627    -2362     
  Branches       2050     2051       +1     
============================================
- Hits          12766    11705    -1061     
+ Misses        10433     9204    -1229     
+ Partials        790      718      -72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zuston zuston left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice catch @rickyma .

LGTM. Let's merge this

@zuston
zuston merged commit 5a8c2eb into apache:master Dec 25, 2023
zuston pushed a commit to zuston/incubator-uniffle that referenced this pull request Dec 31, 2023
…arios in shuffle server. (apache#1392)

### What changes were proposed in this pull request?

Release the direct memory in the finally block to prevent memory leaks.

### Why are the changes needed?

For [apache#1391](apache#1391)

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

By running server successfully.
@rickyma
rickyma deleted the potential-mem-leak branch May 5, 2024 08:34
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.

3 participants