Skip to content

Conversation

@benwtrent
Copy link
Member

When deserializing multi-doc compressed model definitions, I periodically receive weird errors regarding bytes references.

Turns out, when we parse the individual bytes references we parse them into ByteArrays which satisfy the bytes() method.

But, CompositeBytesReference, when there are multiple BytesReferences, does not allow bytes() to be called.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@benwtrent benwtrent force-pushed the feature/ml-fix-compressed-model-definition-bug branch from 9e4d6bd to 2ccd83f Compare November 4, 2021 21:02
Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM thanks for adding the tests

@benwtrent benwtrent added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Nov 5, 2021
@elasticsearchmachine elasticsearchmachine merged commit 7ed67e6 into elastic:master Nov 5, 2021
@benwtrent benwtrent deleted the feature/ml-fix-compressed-model-definition-bug branch November 5, 2021 13:39
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Nov 5, 2021
…elastic#80377)

When deserializing multi-doc compressed model definitions, I
periodically receive weird errors regarding bytes references.  Turns
out, when we parse the individual bytes references we parse them into
`ByteArrays` which satisfy the `bytes()` method.  But,
`CompositeBytesReference`, when there are multiple BytesReferences, does
not allow `bytes()` to be called.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.0

elasticsearchmachine pushed a commit that referenced this pull request Nov 5, 2021
…#80377) (#80414)

When deserializing multi-doc compressed model definitions, I
periodically receive weird errors regarding bytes references.  Turns
out, when we parse the individual bytes references we parse them into
`ByteArrays` which satisfy the `bytes()` method.  But,
`CompositeBytesReference`, when there are multiple BytesReferences, does
not allow `bytes()` to be called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :ml Machine learning >non-issue Team:ML Meta label for the ML team v8.0.0-rc1 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants