Skip to content

fix: prevent OOM on very deep DAGs #253

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

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

achingbrain
Copy link
Member

Refactor exporting files to use a queue instead of recursion to walk the DAG. The queue exectutes on a new stack so we won't run out of memory when traversing very deep DAGs.

Refactor exporting files to use a queue instead of recursion to walk
the DAG.  The queue exectutes on a new stack so we won't run out of
memory when traversing very deep DAGs.
@BigLep
Copy link

BigLep commented Sep 19, 2022

@achingbrain : is there test coverage around this, at least guaranteeing we haven't broken anything, even if we're not proving that we have fixed things?

@achingbrain
Copy link
Member Author

@BigLep there is plenty of test coverage of this file - we have codecov set up but for some reason we don't get the report as a comment on the PR. Digging through the CI logs, this is the report - https://app.codecov.io/github/ipfs/js-ipfs-unixfs/commit/890c43c978e84e608699284fb435b2a5d86de2ee

@achingbrain achingbrain merged commit 62494bf into master Sep 21, 2022
@achingbrain achingbrain deleted the fix/oom-on-deep-dags branch September 21, 2022 16:31
github-actions bot pushed a commit that referenced this pull request Sep 21, 2022
## [ipfs-unixfs-exporter-v8.0.6](ipfs-unixfs-exporter-v8.0.5...ipfs-unixfs-exporter-v8.0.6) (2022-09-21)

### Bug Fixes

* prevent OOM on very deep DAGs ([#253](#253)) ([62494bf](62494bf))
@github-actions
Copy link

🎉 This PR is included in version ipfs-unixfs-exporter-v8.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants