Skip to content

Enable Circuit Breaker tracking in more parts of the aggregations framework #89437

@not-napoleon

Description

@not-napoleon

Description

This meta issue tracks the effort to extend circuit breaker memory tracking beyond the collect phase of aggregations. There are several existing issues related to this, which do a good job of describing the problem (and are linked below), but we need a place to track the tasks for fixing this. That's what this issue is for.

Plan

Currently (8.4) aggregations create an object per collected bucket, called InternalAggregation. These objects are stored in the QuerySearchResult which is responsible for serializing them from the data nodes back to the coordinator, and also for de-serializing them on coordinator side. Managing these objects is quite tricky, and does not provide good places to inject the circuit breaker logic.

Instead, we want to move to a dense representation, which would create one object per aggregator. These objects would be Releasable, and responsible for tracking both the post-collection data node side memory usage and the reduce time coordinating node memory usage. Obviously this involves a (big) change to the wire format used for QuerySearchResult. Doing this in a backwards compatible way is non trivial.

Tasks


Vague Tasks

  • Prototype a dense representation that addresses the memory concerns. Initially this can be done with the non-recycling big arrays instance, but long term needs to be wired up to a real circuit breaker.
    • Works for Max
    • Works for Range
    • Works for Cardinality
    • Works for Terms
  • Make sure the prototype dense representation also solves the normalization concerns within terms
  • Validate prototype (many reviews)
  • BWC, Mixed Mode, CCS testing, testing, testing
  • convert the rest of the aggs

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions