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 plotting getting stuck #3200

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Fix plotting getting stuck #3200

merged 1 commit into from
Oct 31, 2024

Conversation

nazar-pc
Copy link
Member

This is essentially a regression from #3160.

I'm not really sure under which circumstances, but it is hypothetically possible for sectors_metadata.read().await in plot_single_sector to yield to executor after already reserving the RwLock acquisition slot, such that when sectors_metadata.write().await is called in process_plotting_result after #3160 just hangs forever.

Essentially an issue of a similar nature to #3041, which is counter-intuitive because it behaves differently from synchronous counterparts in standard library and parking_lot.

The solution is to allow these to run process_plotting_result concurrently with everything else, which also has added benefit of making some progress for plotting elsewhere while writes in process_plotting_result are happening.

This is a less hacky version that should help avoiding similar issues in the future if/when we do further refactoring.

Code contributor checklist:

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks for tracking this down, looks annoying!

@nazar-pc nazar-pc added this pull request to the merge queue Oct 31, 2024
Merged via the queue into main with commit 379fe0e Oct 31, 2024
8 checks passed
@nazar-pc nazar-pc deleted the fix-plotting-getting-stuck branch October 31, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants