Refactor query latch#155881
Conversation
|
cc @Zoxc |
Removed unnecessary mutex for cycle errors
5f18255 to
2e842f1
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Seems ok to me, though I don't understand this code well. @Zoxc: any concerns before I approve it? |
|
The cycle is associated with the waiter (it's given to the waiting thread), not really the latch itself, so I'd like to avoid this change unless needed. I'd consider it alongside #155927 given that it appears to be blocking on this. |
|
Youre telling me I should close this? Or what should I do? |
@Zoxc: can you expand on your comment? #155927 is marked as blocking on this PR, and I'm uncertain about the exact relationship between the two PRs. |
This PR removes unnecessary mutex for cycle errors. This is revival of #153779. Previously we could have to stored a cycle error per each query waiter in the cycle thus requiring a mutex for cycle error in each query waiter. However as #154973 has been merged query cycles break only on a single query so that
QueryLatchcan contain a singleOption<Cycle>field.r? @nnethercote