Skip to content

Redis: Correctly release incomplete message on removal when using RedisArrayAggregator#16878

Merged
normanmaurer merged 3 commits into
4.1from
r41
Jun 2, 2026
Merged

Redis: Correctly release incomplete message on removal when using RedisArrayAggregator#16878
normanmaurer merged 3 commits into
4.1from
r41

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

Motivation:

The RedisArrayAggregator needs to ensure it releases buffered messages when the handler is removed as otherwise it will result in memory leaks.

Modifications:

  • fire exception when channel is closed while we still aggregate
  • release messages on handler removal
  • add unit tests

Result:

Fix memory leak

…isArrayAggregator

Motivation:

The RedisArrayAggregator needs to ensure it releases buffered messages when the handler is removed as otherwise it will result in memory leaks.

Modifications:

- fire exception when channel is closed while we still aggregate
- release messages on handler removal
- add unit tests

Result:

Fix memory leak
@normanmaurer normanmaurer added this to the 4.1.135.Final milestone Jun 1, 2026
@normanmaurer normanmaurer added the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 1, 2026
@normanmaurer normanmaurer merged commit ced30ad into 4.1 Jun 2, 2026
18 checks passed
@normanmaurer normanmaurer deleted the r41 branch June 2, 2026 16:13
@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16903

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 2, 2026
chrisvest added a commit that referenced this pull request Jun 4, 2026
… when using RedisArrayAggregator (#16903)

Auto-port of #16878 to 5.0
Cherry-picked commit: ced30ad

---
Motivation:

The RedisArrayAggregator needs to ensure it releases buffered messages
when the handler is removed as otherwise it will result in memory leaks.

Modifications:

- fire exception when channel is closed while we still aggregate
- release messages on handler removal
- add unit tests

Result:

Fix memory leak

---------

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
Co-authored-by: Chris Vest <christianvest_hansen@apple.com>
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.

2 participants