Skip to content

[9.3] ESQL: Aggressively free topn (#140126)#140174

Merged
elasticsearchmachine merged 2 commits intoelastic:9.3from
nik9000:backport/9.3/pr-140126
Jan 5, 2026
Merged

[9.3] ESQL: Aggressively free topn (#140126)#140174
elasticsearchmachine merged 2 commits intoelastic:9.3from
nik9000:backport/9.3/pr-140126

Conversation

@nik9000
Copy link
Member

@nik9000 nik9000 commented Jan 5, 2026

Backports the following commits to 9.3:

Without this we free the entire `TopNOperator` and then pitch the
reference to it. It'd be best if these two things were atomically locked
together, but so long as everything we free is small-ish we can live
with keeping the reference for a bit. We reserve some room to maneuver
here. But if the thing we're freeing is quite large this ain't great. We
think we have room to allocate but we don't.

With this we pitch the reference to each row as we go so they can be
GCed immediately. This keeps the untracked-but-hard-referenced state to
a single row at a time.
@nik9000 nik9000 added :Analytics/ES|QL AKA ESQL >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Jan 5, 2026
@elasticsearchmachine elasticsearchmachine merged commit 7102140 into elastic:9.3 Jan 5, 2026
35 checks passed
@nik9000 nik9000 deleted the backport/9.3/pr-140126 branch January 5, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.3.1

2 participants