Skip to content

Trash derived netty buffers#117744

Merged
mhl-b merged 1 commit intoelastic:mainfrom
mhl-b:more-trashing-alloc
Nov 29, 2024
Merged

Trash derived netty buffers#117744
mhl-b merged 1 commit intoelastic:mainfrom
mhl-b:more-trashing-alloc

Conversation

@mhl-b
Copy link
Contributor

@mhl-b mhl-b commented Nov 29, 2024

TrahsingByteBuf #116115 does not fully cover derived buffers - slices and copies. This PR wraps all dervied buffers into TrashingByteBuf.

It's not a problem when HTTP aggregator is used, since it will allocate TrashingCompositeByteBuf. But non aggregated parts, like HttpContent, are created using derived buffers, these will not trash. For example here: https://github.com/netty/netty/blob/225adacc2da02403640435ca53cfce9bf78995bf/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java#L439

@mhl-b mhl-b added >test Issues or PRs that are addressing/adding tests :Distributed/Network Http and internode communication implementations v9.0.0 Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. v8.18.0 labels Nov 29, 2024
@mhl-b mhl-b requested a review from DaveCTurner November 29, 2024 06:36
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

@mhl-b mhl-b changed the title Trash derived buffers netty buffers Nov 29, 2024
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM

@mhl-b mhl-b added the auto-backport Automatically create backport pull requests when merged label Nov 29, 2024
@mhl-b mhl-b merged commit 39481e9 into elastic:main Nov 29, 2024
mhl-b added a commit to mhl-b/elasticsearch that referenced this pull request Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Distributed/Network Http and internode communication implementations Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. >test Issues or PRs that are addressing/adding tests v8.18.0 v9.0.0

3 participants