-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Issue #8674: Interrupt Work Stealing #8679
Conversation
Check the work stealing loop for aborts so it doesn't loop forever.
Confirm that fixes the issue, and makes sense to me. I took a look at the code, question is whether this should not use some sort of general locking mechanism to avoid threading issues. Say 2 threads both call StealWork (that internally has a lock, so will serve only one at a time), then the one that gets out throws right away, would that be also a problem? edited: I though I had a solution, but it's just adding confusion (and it's wrong). So first maybe we try to check whether this is a problem at all |
I try to avoid locks because they are so heavyweight. |
I am not sure that helps. Say two threads both passed the check on |
When it fails, it will yield and the next loop will find the interrupt. |
Right, eventually (even a few cycle laters we don't care), it will eventually get out of the loop. Thanks for walking me through. |
Yeah its not the most resource-friendly way of doing it, but feature freeze (and VLDB) are approaching, so this seems good enough for now. |
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.
lookin good!
Piggyback coverage tweak
Check the work stealing loop for aborts so it doesn't loop forever.
fixes duckdblabs/duckdb-internal#140