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
Add peek functionality to index reader and use it in the file source (2.8.x) #9961
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.8.x #9961 +/- ##
==========================================
+ Coverage 49.72% 49.85% +0.13%
==========================================
Files 565 565
Lines 69254 69270 +16
==========================================
+ Hits 34435 34537 +102
+ Misses 31353 31302 -51
+ Partials 3466 3431 -35 ☔ View full report in Codecov by Sentry. |
if idx.File != nil { | ||
if atEnd(idx.Path, r.filter) { |
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.
This looks intentional, but just to confirm: Do we only want to peek if the next file
index is past the range?
Otherwise, it looks like range
indices will continue to be read until we get to the next file index.
I assume this is needed so we emit the peeked file, maybe that's something worth calling out with a comment so it doesn't have to be inferred and we're aware of that later if we need to modify this code.
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.
Yeah, we want to check the first file index after the end of the path range. This may involve traversing additional range indexes if the end of the path range lines up with a chunk boundary.
No description provided.