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
pageserver: drop the layer map lock after planning reads #7215
Conversation
2730 tests run: 2590 passed, 0 failed, 140 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
b1feb1f at 2024-03-27T16:28:03.162Z :recycle: |
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.
Accidentially hit the pending review comment button, flushing.
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.
Seems like we can remove the InMemoryLayerHandle
?
It's dead code, but not identified because it's pub
.
I haven't reviewed the Ordering / descriptor stuff, as Joonas has already commented on it.
I think it would be nice to minimize this diff by
- putting the new types in the same location in the file as the old types and
- using the same names
We can improve the names in a later PR.
Then again, this is not a super strongly held request.
The PR description only mentions "rework the fringe a bit", but, doesn't explain why the signature of get_values_reconstruct_data
had to change and now includes an LSN range. I think a bit more description is justified.
Specifically, it would be nice to explain what exactly has been reworked.
The core change "hold struct Layer or Arc" without the layer map lock is sound.
Good catch. Done.
Done.
The old names don't really fit anymore.
Updated the PR description. |
Problem
The vectored read path holds the layer map lock while visiting a timeline.
Summary of changes
Layer
onArc<InMemoryLayer>
handles instead of descriptions that are resolved by the layer map at the time of read. Note that previouslyget_values_reconstruct_data
was implemented for the layer description which already knew the lsn range for the read. Now it is implemented on the newReadableLayer
handle and needs to get the lsn range as an argument.Related #6833
Checklist before requesting a review
Checklist before merging