Skip to content

Comments

Flush the rate buffer when the slice index changes#138856

Merged
dnhatn merged 1 commit intoelastic:mainfrom
dnhatn:flush-rate-buffer
Jan 7, 2026
Merged

Flush the rate buffer when the slice index changes#138856
dnhatn merged 1 commit intoelastic:mainfrom
dnhatn:flush-rate-buffer

Conversation

@dnhatn
Copy link
Member

@dnhatn dnhatn commented Dec 2, 2025

For rate aggregations, we buffer raw input data points until all slices are processed. Buffers can be periodically flushed when the slice changes, since each slice contains all data points for a shard within a specific time range. This approach helps reduce memory pressure. However, if the number of slices is smaller than the number of active drivers, it will not help. We should partition the data into multiple reasonably sized slices. I will follow up with this change soon.

@dnhatn dnhatn force-pushed the flush-rate-buffer branch from 043fc8a to 199bb3c Compare January 7, 2026 06:29
@dnhatn dnhatn added v9.3.1 :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL >non-issue labels Jan 7, 2026
@dnhatn dnhatn requested review from JonasKunz and kkrik-es January 7, 2026 16:16
@dnhatn dnhatn marked this pull request as ready for review January 7, 2026 16:16
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@dnhatn
Copy link
Member Author

dnhatn commented Jan 7, 2026

Thanks Kostas!

@dnhatn dnhatn added the auto-backport Automatically create backport pull requests when merged label Jan 7, 2026
@dnhatn dnhatn merged commit bb60648 into elastic:main Jan 7, 2026
35 checks passed
@dnhatn dnhatn deleted the flush-rate-buffer branch January 7, 2026 16:29
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Jan 7, 2026
For rate aggregations, we buffer raw input data points until all slices 
are processed. Buffers can be periodically flushed when the slice
changes, since each slice contains all data points for a shard within a
specific time range. This approach helps reduce memory pressure.
However, if the number of slices is smaller than the number of active
drivers, it will not help. We should partition the data into multiple
reasonably sized slices. I will follow up with this change soon.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.3

elasticsearchmachine pushed a commit that referenced this pull request Jan 7, 2026
For rate aggregations, we buffer raw input data points until all slices 
are processed. Buffers can be periodically flushed when the slice
changes, since each slice contains all data points for a shard within a
specific time range. This approach helps reduce memory pressure.
However, if the number of slices is smaller than the number of active
drivers, it will not help. We should partition the data into multiple
reasonably sized slices. I will follow up with this change soon.
szybia added a commit to szybia/elasticsearch that referenced this pull request Jan 7, 2026
* upstream/main:
  Add hook for blocking termination (elastic#133555)
  Delegate to ES93ScalarQuantizedVectorsFormat rather than copying behaviour (elastic#139834)
  Refactor compound block types (elastic#140219)
  Flush the rate buffer when the slice index changes (elastic#138856)
  Log linked project connection errors at debug during shutdown (elastic#140239)
  Periodic FIPS 140-3 buildkite pipelines (elastic#139909)
  ES|QL - Remove TERM function (elastic#139953)
  Fix name of started time field in shutdown status (elastic#139910)
  Drop `project_routing` from query params (elastic#140272)
  Fix flaky test: AllocationDecidersTests (elastic#140271)
  Add List Reindex API (elastic#140184)
  Expose _tier metadata attribute in ESQL (elastic#139894)
  Tweak TSDBRestEsqlIT#testTimeSeriesQuerying(...) (elastic#140210)
  Fix an OOM error when creating to many chained synonym graph token filter. (elastic#140026)
  Suppress Azure SDK error logs (elastic#139730)
  Rewritten integer sorts need to use SortedNumericSortField (elastic#139538) (elastic#139700)
  Adjust index versions for skippers for time series (elastic#139670)
  Fix host.name skippers index version range (elastic#139636)
  Remove BWC shim for a broken commit
  Fix index.mapping.use_doc_values_skipper defaults in serverless (elastic#139532)
sidosera pushed a commit to sidosera/elasticsearch that referenced this pull request Jan 7, 2026
For rate aggregations, we buffer raw input data points until all slices 
are processed. Buffers can be periodically flushed when the slice
changes, since each slice contains all data points for a shard within a
specific time range. This approach helps reduce memory pressure.
However, if the number of slices is smaller than the number of active
drivers, it will not help. We should partition the data into multiple
reasonably sized slices. I will follow up with this change soon.
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 >non-issue :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL Team:StorageEngine v9.3.1 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants