Skip to content

Fix memory leak of direct memory in direct memory entry logger.#3983

Merged
hezhangjian merged 1 commit into
apache:masterfrom
horizonzy:fix-memory-leak-enable-direct-memory
Jun 13, 2023
Merged

Fix memory leak of direct memory in direct memory entry logger.#3983
hezhangjian merged 1 commit into
apache:masterfrom
horizonzy:fix-memory-leak-enable-direct-memory

Conversation

@horizonzy

Copy link
Copy Markdown
Member

Descriptions of the changes in this PR:

Motivation

When open a non-exist file for DirectReader, it will throw an exception. The ByteBuf won't release.
When close DirectWriter, if the close failed, the ByteBuf also won't release.

@wenbingshen wenbingshen 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.

Good catch

@hangc0276 hangc0276 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job!

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@hezhangjian
hezhangjian merged commit c8c593e into apache:master Jun 13, 2023
zymap pushed a commit that referenced this pull request Jun 19, 2023
Descriptions of the changes in this PR:

### Motivation
When open a non-exist file for DirectReader, it will throw an exception. The ByteBuf won't release.
When close DirectWriter, if the close failed, the ByteBuf also won't release.

(cherry picked from commit c8c593e)
@hangc0276 hangc0276 mentioned this pull request Jun 27, 2023
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
Descriptions of the changes in this PR:

### Motivation
When open a non-exist file for DirectReader, it will throw an exception. The ByteBuf won't release.
When close DirectWriter, if the close failed, the ByteBuf also won't release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants