-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recycle pages used by outgoing publications #77407
Recycle pages used by outgoing publications #77407
Conversation
Today `PublicationTransportHandler.PublicationContext` allocates a bunch of memory for serialized cluster states and diffs, but it uses a plain `BytesStreamOutput` which means that the backing pages are allocated by the `BigArrays#NON_RECYCLING_INSTANCE`. With this commit we pass in a proper `BigArrays` so that the pages being used can be recycled.
Pinging @elastic/es-distributed (Team:Distributed) |
This failed in CI after merging, see https://gradle-enterprise.elastic.co/s/o2issgehbeciw (despite repeated passes locally, although with a couple of changes since the soak test). I've reverted it and reopened this as a PR to investigate further later. |
It turned out to be NBD, one test needed a final |
Gentle ping for a review @original-brownbear, it's just a couple of small changes over what was already reviewed so should be a quick one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :) sorry this fell of my radar
Today we protect against releasing a request from a remote node until its handler has completed, but we do not have the same protection for requests from the local node. This commit adds the missing refcounting. Relates elastic#77407 Closes elastic#77634
Today we protect against releasing a request from a remote node until its handler has completed, but we do not have the same protection for requests from the local node. This commit adds the missing refcounting. Relates elastic#77407 Closes elastic#77634
Today
PublicationTransportHandler.PublicationContext
allocates a bunchof memory for serialized cluster states and diffs, but it uses a plain
BytesStreamOutput
which means that the backing pages are allocated bythe
BigArrays#NON_RECYCLING_INSTANCE
. With this commit we pass in aproper
BigArrays
so that the pages being used can be recycled.Re-run of #77317