Skip to content

[9.3] Partition time-series source (#140475)#141086

Merged
dnhatn merged 1 commit intoelastic:9.3from
dnhatn:backport/9.3/pr-140475
Jan 22, 2026
Merged

[9.3] Partition time-series source (#140475)#141086
dnhatn merged 1 commit intoelastic:9.3from
dnhatn:backport/9.3/pr-140475

Conversation

@dnhatn
Copy link
Member

@dnhatn dnhatn commented Jan 21, 2026

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

Today, for rate aggregations, we can't partition a target shard by DOC
or SEGMENT, only by SHARD. Because of this, we rely on ROUND_TO from
time_bucket to partition the target shard into multiple slices. However,
the number of slices can be either too many or too few. Too few large
slices might under-utilize the CPUs and require a large amount of memory
to buffer data points. Many smaller slices solve these issues but add
significant overhead.

This change replaces the ROUND_TO partitioning with time-based
partitioning for time-series sources. One potential overhead of this
method compared to ROUND_TO is that, with ROUND_TO, we do not need to
perform round_to for the timestamp, as the query source provides this
constant.

(cherry picked from commit 54ee110)

# Conflicts:
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/k8s-timeseries.csv-spec
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
@dnhatn dnhatn merged commit dda0666 into elastic:9.3 Jan 22, 2026
35 checks passed
@dnhatn dnhatn deleted the backport/9.3/pr-140475 branch January 22, 2026 00:43
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

Comments