Clarify expectedSize behaviour of ReleasableBytesStreamOutput#142451
Merged
DaveCTurner merged 1 commit intoelastic:mainfrom Feb 19, 2026
Merged
Conversation
This caught me out in elastic#140365: we actually don't use the slow-growth behaviour by default with a `ReleasableBytesStreamOutput`, you have to ask for it. But we do ask for it sometimes, so this commit fixes the docs and one of the places where we do. Relates elastic#142290, which fixes another case of this.
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Feb 13, 2026
nik9000
approved these changes
Feb 19, 2026
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Feb 19, 2026
…on-sliced-reindex * upstream/main: (120 commits) [Fleet] Add OpAMP field mappings to fleet-agents (elastic#142550) Clarify `expectedSize` behaviour of `ReleasableBytesStreamOutput` (elastic#142451) Refactor KnnIndexTester to tidy up some options (elastic#142651) Fixed with elastic#142638 already (elastic#142655) Change *OverTimeTests to extend AbstractAggregationTestCase (elastic#142659) Fix byteRefBlockHashSize for release mode (elastic#142668) Mute org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests testTransform {class org.elasticsearch.xpack.esql.plan.logical.MMR} elastic#142674 Fix PAUSED_FOR_NODE_REMOVAL shard blocking QUEUED promotion (elastic#142637) Mute org.elasticsearch.xpack.logsdb.RandomizedRollingUpgradeIT testIndexingStandardSource elastic#142670 Revert "[ESQL] Introduce pluggable external datasource framework (elastic#141678) (elastic#142663) Mute org.elasticsearch.xpack.esql.spatial.SpatialPushDownGeoShapeIT testQuantizedXY elastic#141234 PromQL: infer start/end from query DSL filters (elastic#142580) Add GPU vector indexing monitoring to _xpack/usage (elastic#141932) Fix testTrackerClearShutdown: use non-zero startTimeMillis for DONE status (elastic#142646) Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#142426 ESQL_ Move time_zone to GA (elastic#142287) Mute org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT test elastic#142426 DOCS: Convert Painless diagrams to mermaid (elastic#141851) ES|QL: fix validation in generative tests (elastic#142638) Unmute tests that do not reproduce failures (elastic#141712) ...
This was referenced Feb 26, 2026
ebarlas
added a commit
that referenced
this pull request
Feb 26, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until #142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
PeteGillinElastic
pushed a commit
to PeteGillinElastic/elasticsearch
that referenced
this pull request
Feb 27, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until elastic#142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
ebarlas
added a commit
to ebarlas/elasticsearch
that referenced
this pull request
Feb 27, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until elastic#142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
ebarlas
added a commit
to ebarlas/elasticsearch
that referenced
this pull request
Feb 27, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until elastic#142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
ebarlas
added a commit
to ebarlas/elasticsearch
that referenced
this pull request
Feb 27, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until elastic#142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
ebarlas
added a commit
that referenced
this pull request
Mar 2, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until #142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
ebarlas
added a commit
that referenced
this pull request
Mar 2, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until #142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
ebarlas
added a commit
that referenced
this pull request
Mar 2, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until #142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
tballison
pushed a commit
to tballison/elasticsearch
that referenced
this pull request
Mar 3, 2026
updateSearchApplication released a ReleasableBytesStreamOutput in a try-with-resources block while an async client.index() call still held a BytesReference view of its pages. The bug was latent until elastic#142451 switched the default buffer size to PAGE_SIZE_IN_BYTES, causing BigArrays to recycle pages instead of plain byte arrays. Freed pages were immediately reused, corrupting the IndexRequest source on replica nodes. Bind buffer release to the async listener via ActionListener.run and flush instead of close, matching AsyncTaskIndexService.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This caught me out in #140365: we actually don't use the slow-growth
behaviour by default with a
ReleasableBytesStreamOutput, you have toask for it. But we do ask for it sometimes, so this commit fixes the
docs and one of the places where we do.
Relates #142290, which fixes another case of this.