Skip to content

Clarify expectedSize behaviour of ReleasableBytesStreamOutput#142451

Merged
DaveCTurner merged 1 commit intoelastic:mainfrom
DaveCTurner:2026/02/13/ReleasableBytesStreamOutput-clarify-expectedSize
Feb 19, 2026
Merged

Clarify expectedSize behaviour of ReleasableBytesStreamOutput#142451
DaveCTurner merged 1 commit intoelastic:mainfrom
DaveCTurner:2026/02/13/ReleasableBytesStreamOutput-clarify-expectedSize

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

This caught me out in #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 #142290, which fixes another case of this.

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.
@DaveCTurner DaveCTurner requested a review from mhl-b February 13, 2026 08:38
@DaveCTurner DaveCTurner requested a review from a team as a code owner February 13, 2026 08:38
@DaveCTurner DaveCTurner added :Distributed/Network Http and internode communication implementations v9.4.0 labels Feb 13, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label Feb 13, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 13, 2026
@DaveCTurner DaveCTurner merged commit 42e70d8 into elastic:main Feb 19, 2026
35 checks passed
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)
  ...
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Network Http and internode communication implementations >non-issue Team:Distributed Meta label for distributed team. v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants