-
Notifications
You must be signed in to change notification settings - Fork 458
feat(parallel random reads): Changes to enable parallel random read handling in random reader #3577
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
base: master
Are you sure you want to change the base?
Conversation
…'t removed the file handle lock yet
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3577 +/- ##
==========================================
+ Coverage 79.69% 79.72% +0.03%
==========================================
Files 144 144
Lines 19139 19241 +102
==========================================
+ Hits 15252 15340 +88
- Misses 3366 3371 +5
- Partials 521 530 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/gemini review |
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.
Code Review
This pull request introduces changes to enable parallel read handling in the randomReader
. The core idea is to use a mutex to serialize access for RangeReader
while allowing MultiRangeReader
operations to proceed in parallel. The main area for improvement is the locking strategy within the ReadAt
function, which uses a double-checked locking pattern that is complex and introduces a potential race condition. I've provided a detailed comment with a suggestion to simplify the locking logic, making it more robust and maintainable.
/gemini summary |
Summary of ChangesThis pull request introduces significant changes to the Highlights
Changelog
Activity
|
/gemini summary |
This pull request introduces changes to enable parallel read handling in the randomReader. The core idea is to use a mutex to serialize access for RangeReader while allowing MultiRangeReader operations to proceed in parallel.
The main approach is to determine read type without taking any locks and then allow parallel processing for MRD. For range reader, we would take a lock to synchronize access. Since reads wait on a lock for range reader, the reader type computation is done again before actually reading via range reader to ensure that the read should not be served by MRD.