Skip to content

feat: make SharedCoalescer do memory accounting for buffered batches #25904

Description

@gruuya

Is your feature request related to a problem or challenge?

We ran into a case where a DataFusion process hit memory resource limits (and got OOMed) before it actually got near the set memory pool limit.

The nature of the query (many join operators, many partitions), led claude to believe a significant part of it was down to unaccounted memory in the SharedCoalescer, which was coincidentally also discussed in the original PR #22010 (comment)

Describe the solution you'd like

Thread a memory reservation down to SharedCoalescer and grow/shrink it as the batches are pushed/drained from it.

Even though an individual SharedCoalescer by default buffers only a modest number of rows, this problem can compound otherwise, since SharedCoalescer are per partition and per operator.

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added theissue type on Sep 30, 2026
  2. 2010YOUY01 commented on Oct 1, 2026

    @2010YOUY01
    Contributor

    The nature of the query (many join operators, many partitions)

    If it's a RSS and memory-pool limit inconcsistency, another possible trigger might be the 2X memory amplification in the buffering phase of NLJ/HJ

    NLJ fix would be available in the next release

  3. Abhisheklearn12 commented on Oct 3, 2026

    @Abhisheklearn12
    Contributor

    hi @2010YOUY01 and @gruuya, I would like to work on this issue, if no one is working on this

  4. Abhisheklearn12 commented on Oct 7, 2026

    @Abhisheklearn12
    Contributor

    take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions