Skip to content

Configurable bound on RedisArrayAggregator#16858

Merged
normanmaurer merged 1 commit into
4.1from
redis41
Jun 1, 2026
Merged

Configurable bound on RedisArrayAggregator#16858
normanmaurer merged 1 commit into
4.1from
redis41

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:
The RedisArrayAggregator was pre-allocating the aggregating ArrayList instance based on just the array header message.

Modification:
Add a RedisArrayAggregator constructor that takes a max number of elements as an argument. Deprecate the other constructor and make it use 1.000.000 as a default, defined by a new system property.

Why 1.000.000? It seemed big enough to not cause too many compatibility problems from this change, yet small enough to somewhat constrain the resource usage from nefarious peers.

Result:
Less exposure to excessive resource usage by adversarial peers.

@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
Motivation:
The RedisArrayAggregator was pre-allocating the aggregating ArrayList instance based on just the array header message.

Modification:
Add a RedisArrayAggregator constructor that takes a max number of elements as an argument.
Deprecate the other constructor and make it use 1.000.000 as a default, defined by a new system property.

Why 1.000.000? It seemed big enough to not cause too many compatibility problems from this change, yet small enough to somewhat constrain the resource usage from nefarious peers.

Result:
Less exposure to excessive resource usage by adversarial peers.
@normanmaurer normanmaurer merged commit e51c64c into 4.1 Jun 1, 2026
17 of 18 checks passed
@normanmaurer normanmaurer deleted the redis41 branch June 1, 2026 15:20
@netty-project-bot
Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 5.0.

@chrisvest
Copy link
Copy Markdown
Member

Port to 5.0: #16914

@chrisvest chrisvest removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 4, 2026
chrisvest added a commit that referenced this pull request Jun 5, 2026
- #16881
- #16876
- #16866
- #16870
- #16837
- #16858
- #16882
- #16893

---------

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Violeta Georgieva <[email protected]>
Co-authored-by: Szymon Habrainski <[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