Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes an issue with AppendableMemory that can cause MSQ jobs to fail #17369

Merged
merged 5 commits into from
Oct 18, 2024

Conversation

LakshSingla
Copy link
Contributor

@LakshSingla LakshSingla commented Oct 17, 2024

Description

This PR fixes a bug with the AppendableMemory where it fails the allocation even though there is enough space to complete it.

There are 2 components to the allocation -

  1. availableToReserve which returns the max allocation that can be requested. It returns the max of the available memory in the allocator and the free space in the last allocated block
  2. reserveAdditional makes the allocation and reserves the data

(2) fails if the additionally reserved memory can be satisfied with the last allocated block but not by the allocator. Check the added test case for a better description of how this bug can arise.


Key changed/added classes in this PR
  • MyFoo
  • OurBar
  • TheirBaz

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@cryptoe cryptoe added this to the 31.0.0 milestone Oct 17, 2024
@github-actions github-actions bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Oct 17, 2024
@cryptoe cryptoe merged commit 5b09329 into apache:master Oct 18, 2024
89 of 90 checks passed
cryptoe pushed a commit that referenced this pull request Oct 18, 2024
…s to fail" (#17369) (#17372)

 Fixes an issue with AppendableMemory that can cause MSQ jobs to fail (#17369)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants