Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[bugfix] Fix memory leak in case of closed connections with pending requests #1626

Merged

Conversation

eolivelli
Copy link
Contributor

Motivation

When a connection is closed while having pending requests, the ByteBuf is not released.

Modifications

Release the ByteBuf attached to the original request

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

  • doc

    (If this PR contains doc changes)

@github-actions github-actions bot added the no-need-doc This pr does not need any document label Dec 13, 2022
lhotari
lhotari previously approved these changes Dec 13, 2022
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

Good work @eolivelli

BewareMyPower
BewareMyPower previously approved these changes Dec 13, 2022
Copy link
Contributor

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #1626 (4d186d4) into master (1e5433d) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1626      +/-   ##
============================================
- Coverage     15.77%   15.76%   -0.02%     
  Complexity      612      612              
============================================
  Files           164      164              
  Lines         12249    12251       +2     
  Branches       1124     1124              
============================================
- Hits           1932     1931       -1     
- Misses        10158    10161       +3     
  Partials        159      159              
Impacted Files Coverage Δ
...ative/pulsar/handlers/kop/KafkaCommandDecoder.java 0.34% <0.00%> (-0.01%) ⬇️
...ative/pulsar/handlers/kop/PendingTopicFutures.java 70.58% <0.00%> (-5.89%) ⬇️
...pulsar/handlers/kop/utils/timer/TimerTaskList.java 78.31% <0.00%> (+2.40%) ⬆️

@BewareMyPower BewareMyPower merged commit aaa8035 into streamnative:master Jan 3, 2023
Demogorgon314 pushed a commit that referenced this pull request Feb 7, 2023
…equests (#1626)

### Motivation

When a connection is closed while having pending requests, the ByteBuf
is not released.

### Modifications

Release the ByteBuf attached to the original request

(cherry picked from commit aaa8035)
Demogorgon314 pushed a commit that referenced this pull request Feb 7, 2023
…equests (#1626)

### Motivation

When a connection is closed while having pending requests, the ByteBuf
is not released.

### Modifications

Release the ByteBuf attached to the original request

(cherry picked from commit aaa8035)
Demogorgon314 pushed a commit that referenced this pull request Feb 27, 2023
…equests (#1626)

### Motivation

When a connection is closed while having pending requests, the ByteBuf
is not released.

### Modifications

Release the ByteBuf attached to the original request

(cherry picked from commit aaa8035)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants