Skip to content

Conversation

@prdoyle
Copy link
Contributor

@prdoyle prdoyle commented May 26, 2025

Changing Text to use ByteBuffer instead of BytesReference had unintended consequences because ByteBuffer is a mutable, stateful object, where BytesReference is not. Using the ByteBuffer (for example, by converting it to a String) "consumes" the buffer's contents and leaves it appearing to be empty.

It's urgent to fix this because it's possible this bug could cause data to quietly disappear.

Reverts #128316 and #127666.

@prdoyle prdoyle self-assigned this May 26, 2025
@prdoyle prdoyle requested a review from a team as a code owner May 26, 2025 18:25
@prdoyle prdoyle added >non-issue :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged v8.19.0 v9.1.0 labels May 26, 2025
@elasticsearchmachine elasticsearchmachine added serverless-linked Added by automation, don't add manually Team:Core/Infra Meta label for core/infra team labels May 26, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@JVerwolf JVerwolf merged commit b282b6e into elastic:patch/serverless-fix May 26, 2025
28 checks passed
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (elastic#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (elastic#127666)"

This reverts commit db0c3c7.
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.19 Commit could not be cherrypicked due to conflicts
main

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 128483

prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (elastic#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (elastic#127666)"

This reverts commit db0c3c7.
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (elastic#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (elastic#127666)"

This reverts commit db0c3c7.
@prdoyle
Copy link
Contributor Author

prdoyle commented May 26, 2025

8.19 backport is here.

elasticsearchmachine pushed a commit that referenced this pull request May 26, 2025
* Revert changes to Text class (#128483)

* Revert "Fix the Text class package change in example plugins (#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (#127666)"

This reverts commit db0c3c7.

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request May 27, 2025
* Revert "Fix the Text class package change in example plugins (#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (#127666)"

This reverts commit db0c3c7.

Co-authored-by: Lorenzo Dematté <[email protected]>
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 :Core/Infra/Core Core issues without another label >non-issue serverless-linked Added by automation, don't add manually Team:Core/Infra Meta label for core/infra team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants