Skip to content

AdaptivePoolingAllocator: call unreserveMatchingBuddy(...) if byteBuf initialization failed#16327

Merged
chrisvest merged 1 commit into
netty:4.2from
laosijikaichele:4.2-unreserveMatchingBuddy
Feb 21, 2026
Merged

AdaptivePoolingAllocator: call unreserveMatchingBuddy(...) if byteBuf initialization failed#16327
chrisvest merged 1 commit into
netty:4.2from
laosijikaichele:4.2-unreserveMatchingBuddy

Conversation

@laosijikaichele
Copy link
Copy Markdown
Contributor

Motivation:
In BuddyChunk.readInitInto(...), we should call unreserveMatchingBuddy(...) if the byteBuf initialization failed, to unreserve the memory.

Modification:
Call unreserveMatchingBuddy(...) in the finally block.

Result:
Better memory utilization.

…ck, if buf initialization failed in BuddyChunk, to reuse memory
@chrisvest chrisvest added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Feb 21, 2026
@chrisvest chrisvest added this to the 4.2.11.Final milestone Feb 21, 2026
@chrisvest chrisvest merged commit 2e93f84 into netty:4.2 Feb 21, 2026
37 of 39 checks passed
netty-project-bot pushed a commit that referenced this pull request Feb 21, 2026
…Buf` initialization failed (#16327)

Motivation:
In `BuddyChunk.readInitInto(...)`, we should call
`unreserveMatchingBuddy(...)` if the `byteBuf` initialization failed, to
unreserve the memory.

Modification:
Call `unreserveMatchingBuddy(...)` in the `finally` block.

Result:
Better memory utilization.

Co-authored-by: lao <none>
(cherry picked from commit 2e93f84)
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 4.1: #16331

@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16332

netty-project-bot pushed a commit that referenced this pull request Feb 21, 2026
…Buf` initialization failed (#16327)

Motivation:
In `BuddyChunk.readInitInto(...)`, we should call
`unreserveMatchingBuddy(...)` if the `byteBuf` initialization failed, to
unreserve the memory.

Modification:
Call `unreserveMatchingBuddy(...)` in the `finally` block.

Result:
Better memory utilization.

Co-authored-by: lao <none>
(cherry picked from commit 2e93f84)
@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Feb 21, 2026
chrisvest pushed a commit that referenced this pull request Feb 21, 2026
…(...)` if `byteBuf` initialization failed (#16332)

Auto-port of #16327 to 5.0
Cherry-picked commit: 2e93f84

---
Motivation:
In `BuddyChunk.readInitInto(...)`, we should call
`unreserveMatchingBuddy(...)` if the `byteBuf` initialization failed, to
unreserve the memory.

Modification:
Call `unreserveMatchingBuddy(...)` in the `finally` block.

Result:
Better memory utilization.

Co-authored-by: old driver <[email protected]>
chrisvest pushed a commit that referenced this pull request Feb 21, 2026
…(...)` if `byteBuf` initialization failed (#16331)

Auto-port of #16327 to 4.1
Cherry-picked commit: 2e93f84

---
Motivation:
In `BuddyChunk.readInitInto(...)`, we should call
`unreserveMatchingBuddy(...)` if the `byteBuf` initialization failed, to
unreserve the memory.

Modification:
Call `unreserveMatchingBuddy(...)` in the `finally` block.

Result:
Better memory utilization.

Co-authored-by: old driver <[email protected]>
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