Skip to content

AdaptivePoolingAllocator: remove ensureAccessible() call in capacity(int) method#16473

Merged
normanmaurer merged 1 commit into
netty:4.2from
laosijikaichele:4.2-capacityAccess
Mar 16, 2026
Merged

AdaptivePoolingAllocator: remove ensureAccessible() call in capacity(int) method#16473
normanmaurer merged 1 commit into
netty:4.2from
laosijikaichele:4.2-capacityAccess

Conversation

@laosijikaichele
Copy link
Copy Markdown
Contributor

@laosijikaichele laosijikaichele commented Mar 15, 2026

Motivation:

In AdaptivePoolingAllocator.capacity(int), the call to checkNewCapacity(newCapacity) already invokes ensureAccessible() internally, making the explicit ensureAccessible() call redundant.

Modification:

Remove the redundant ensureAccessible() call from the capacity(int) method.

Result:

Reducing unnecessary overhead.

@normanmaurer normanmaurer 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 Mar 15, 2026
@normanmaurer normanmaurer merged commit 2ac5bf4 into netty:4.2 Mar 16, 2026
23 checks passed
netty-project-bot pushed a commit that referenced this pull request Mar 16, 2026
…ty(int)` method (#16473)

Motivation:

In `AdaptivePoolingAllocator.capacity(int)`, the call to
`checkNewCapacity(newCapacity)` already invokes `ensureAccessible()`
internally, making the explicit `ensureAccessible()` call redundant.

Modification:

Remove the redundant `ensureAccessible()` call from the `capacity(int)`
method.

Result:

Reducing unnecessary overhead.

(cherry picked from commit 2ac5bf4)
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 4.1: #16475

netty-project-bot pushed a commit that referenced this pull request Mar 16, 2026
…ty(int)` method (#16473)

Motivation:

In `AdaptivePoolingAllocator.capacity(int)`, the call to
`checkNewCapacity(newCapacity)` already invokes `ensureAccessible()`
internally, making the explicit `ensureAccessible()` call redundant.

Modification:

Remove the redundant `ensureAccessible()` call from the `capacity(int)`
method.

Result:

Reducing unnecessary overhead.

(cherry picked from commit 2ac5bf4)
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16476

@github-actions github-actions Bot removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label Mar 16, 2026
@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Mar 16, 2026
normanmaurer pushed a commit that referenced this pull request Mar 16, 2026
…call in `capacity(int)` method (#16475)

Auto-port of #16473 to 4.1
Cherry-picked commit: 2ac5bf4

---
Motivation:

In `AdaptivePoolingAllocator.capacity(int)`, the call to
`checkNewCapacity(newCapacity)` already invokes `ensureAccessible()`
internally, making the explicit `ensureAccessible()` call redundant.

Modification:

Remove the redundant `ensureAccessible()` call from the `capacity(int)`
method.

Result:

Reducing unnecessary overhead.

Co-authored-by: old driver <[email protected]>
normanmaurer pushed a commit that referenced this pull request Mar 16, 2026
…call in `capacity(int)` method (#16476)

Auto-port of #16473 to 5.0
Cherry-picked commit: 2ac5bf4

---
Motivation:

In `AdaptivePoolingAllocator.capacity(int)`, the call to
`checkNewCapacity(newCapacity)` already invokes `ensureAccessible()`
internally, making the explicit `ensureAccessible()` call redundant.

Modification:

Remove the redundant `ensureAccessible()` call from the `capacity(int)`
method.

Result:

Reducing unnecessary overhead.

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