-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage/spanlatch: add test for overlapping spans #40260
Conversation
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.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @irfansharif)
pkg/storage/spanlatch/manager_test.go, line 169 at r1 (raw file):
latchCs = append(latchCs, m.MustAcquireCh(spans("a", "b", write), zeroTS)) latchCs = append(latchCs, m.MustAcquireCh(spans("b", "c", read), zeroTS)) latchCs = append(latchCs, m.MustAcquireCh(spans("b", "c", write), zeroTS))
Right now this case and the last case are getting blocked on their previous cases, not the original latches, right? Can we avoid that by putting the reads at lower timestamps than the writes?
When overlapping spans are acquired, the spanlatch Manager should grant access based on the more restrictive latch over the specific overlapped sub-span. Release note: None
9bacbe8
to
b98fef3
Compare
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten)
pkg/storage/spanlatch/manager_test.go, line 169 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Right now this case and the last case are getting blocked on their previous cases, not the original latches, right? Can we avoid that by putting the reads at lower timestamps than the writes?
oh woops, and yep that does it.
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)
bors r+ |
40260: storage/spanlatch: add test for overlapping spans r=irfansharif a=irfansharif When overlapping spans are acquired, the spanlatch Manager should grant access based on the more restrictive latch over the specific overlapped sub-span. Release note: None Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
Build succeeded |
When overlapping spans are acquired, the spanlatch Manager should
grant access based on the more restrictive latch over the specific
overlapped sub-span.
Release note: None