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

fix: drop provider before getting the next one on range queries #10034

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

joshieDo
Copy link
Collaborator

@joshieDo joshieDo commented Aug 2, 2024

On a range query we iterate over files to collect all data.

There is a very small chance of hitting a deadlock if two consecutive static files share the same bucket in the internal dashmap an we don't drop the current provider before requesting the next one.

@joshieDo joshieDo added C-bug An unexpected or incorrect behavior A-static-files Related to static files labels Aug 2, 2024
@shekhirin
Copy link
Collaborator

Can we add a comment why it's needed?


let mut provider = Some(get_provider(range.start)?);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we need to move the initial provider into the iterator and need to be able to drop it before requesting the next one

@joshieDo joshieDo added this pull request to the merge queue Aug 2, 2024
Merged via the queue into main with commit 721e732 Aug 2, 2024
32 checks passed
@joshieDo joshieDo deleted the joshie/dmap branch August 2, 2024 20:23
martinezjorge pushed a commit to martinezjorge/reth that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-static-files Related to static files C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants