Skip to content

ESQL: Refactor value reading so it can split Pages (#130573) #130781

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

Open
wants to merge 1 commit into
base: 9.1
Choose a base branch
from

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Jul 8, 2025

This refactors our ValuesSourceReaderOperator so it can split pages when it reads large values. It does not actually split the pages as that's a bit tricky. But it sets the stage for the next PR that will do so.

  • Move ValuesSourceReaderOperator to it's own package
  • Move many inner classes into their own top level classes
  • Extend from AbstractPageMappingToIteratorOperator instead of AbstractPageMappingToOperator
    • This allows returning more than one Page per input Page
    • In this PR we still always return one Page per input Page
    • Make new ReleasableIterator subclasses to satisfy AbstractPageMappingToIteratorOperator
    • Change status of loading fields from pages_processed to pages_received and pages_emitted
  • Fix a bug in AbstractPageMappingToOperator which can leak circuit breaker allocation if we fail to during receive. This isn't possible in the existing implementations but is possible in ValuesSourceReaderOperator.
  • Add a test with large text fields. Right now it still comes back in one page because we don't cut the pages.

Closes #130727

Also includes "Claim backported profile versions (#130187)"

This refactors our `ValuesSourceReaderOperator` so it can split pages
when it reads large values. It does not *actually* split the pages as
that's a bit tricky. But it sets the stage for the next PR that will
do so.

* Move `ValuesSourceReaderOperator` to it's own package
* Move many inner classes into their own top level classes
* Extend from `AbstractPageMappingToIteratorOperator` instead of
  `AbstractPageMappingToOperator`
  * This allows returning more than one `Page` per input `Page`
  * In this PR we still always return one `Page` per input `Page`
  * Make new `ReleasableIterator` subclasses to satisfy
    `AbstractPageMappingToIteratorOperator`
  * Change `status` of loading fields from `pages_processed` to
    `pages_received` and `pages_emitted`
* Fix a bug in `AbstractPageMappingToOperator` which can leak circuit
  breaker allocation if we fail to during `receive`. This isn't possible
  in the existing implementations but is possible
  in `ValuesSourceReaderOperator`.
* Add a test with large text fields. Right now it still comes back in
one page because we don't cut the pages.

Closes elastic#130727

Also includes "Claim backported profile versions (elastic#130187)"
@nik9000 nik9000 added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) and removed auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants