-
Notifications
You must be signed in to change notification settings - Fork 186
fix: Cleanup provisional cycle head memos when query panics #993
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: Cleanup provisional cycle head memos when query panics #993
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #993 will improve performances by 11.24%Comparing Summary
Benchmarks breakdown
|
This is something that's sort of impossible to test reliably without shuttle but shuttle still deadlocks (when I'm very confident that it shouldn't because there's a log resuming the deadlocked thread directly one line above) |
Any idea why this is improving several benchmarks? Seems surprising. Is that just noisy benchmarks? That also seems surprising that it would be consistent improvement across four different ones. |
Nope. Maybe the first change that builds with Rust 1.90? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
We've seen in astral-sh/ruff#20477 that Salsa can hang (it gets stuck in a
fetch_with_retry
andMemo::retry_provisional
cycle) if a cycle head query panics.I invested some time to see if there's an easy way to identify a Memo of a panicked query, but without success. That's why I decided to explore if we can clean up any provisional memo if a cycle head panics, and that turns out to be much easier.
I also used this PR as an opportunity to add some more logging which should help debug similar issues more easily in the future.