You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/08/06 20:31:56 UTC

[GitHub] [druid] will-lauer opened a new pull request #11559: Lazy processing of spill files to avoid "Too many open files" errors

will-lauer opened a new pull request #11559:
URL: https://github.com/apache/druid/pull/11559


   <!-- Please read the doc for contribution (https://github.com/apache/druid/blob/master/CONTRIBUTING.md) before making this PR. Also, once you open a PR, please _avoid using force pushes and rebasing_ since these make it difficult for reviewers to see what you've changed in response to their reviews. See [the 'If your pull request shows conflicts with master' section](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#if-your-pull-request-shows-conflicts-with-master) for more details. -->
   
   Fixes #11558.
   
   ### Description
   
   Solve the "Too many open files" problem in some groupBy queries by lazily opening spill files instead of opening them all at once.
   
   Changing `SpillingGrouper` to use a new `LazyCloseableIterator` to lazily open spill files only when actually ready to consume their contents. In `SpillingGrouper.read()`, return a `Provider` that constructs the necessary `MappingIterator` instead of returning the `MappingIterator` itself. This allows a lambda to be used to capture the file, but postpone processing it until actually needed.
   
   #### Fixed the bug #11558 
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `SpillingGrouper`
    * `LazyCloseableIterator`
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] 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](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] 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](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] will-lauer closed pull request #11559: Lazy processing of spill files to avoid "Too many open files" errors

Posted by GitBox <gi...@apache.org>.
will-lauer closed pull request #11559:
URL: https://github.com/apache/druid/pull/11559


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] will-lauer commented on pull request #11559: Lazy processing of spill files to avoid "Too many open files" errors

Posted by GitBox <gi...@apache.org>.
will-lauer commented on pull request #11559:
URL: https://github.com/apache/druid/pull/11559#issuecomment-902731790


   Unfortunately, this doesn't solve the problem, so closing PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] will-lauer commented on pull request #11559: Lazy processing of spill files to avoid "Too many open files" errors

Posted by GitBox <gi...@apache.org>.
will-lauer commented on pull request #11559:
URL: https://github.com/apache/druid/pull/11559#issuecomment-895637752


   Unfortunately, as mentioned in #11558, this does not solve most cases of this problem, as sorting triggers opening all the files anyway, even if they are loaded lazily.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org