-
Notifications
You must be signed in to change notification settings - Fork 34
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
Segment prefetcher #2613
base: develop
Are you sure you want to change the base?
Segment prefetcher #2613
Conversation
Benchmarks: TPC-H on NVMETable of Results
|
Benchmarks: Clickbench on NVMETable of Results
|
Benchmarks: TPC-H on S3Table of Results
|
a30f27c
to
6bf0490
Compare
@@ -275,6 +275,22 @@ impl Layout { | |||
.register_splits(self, field_mask, row_offset, splits) | |||
} | |||
|
|||
pub fn required_segments( |
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.
Please add docs to public functions
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.
Did a first pass, I think I need to spend more time looking at ordering and cancellations
location: location.clone(), | ||
callback: request.callback, | ||
}) | ||
let inflight_segments: InflightSegments = Default::default(); |
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.
You could just do
let inflight_segments: InflightSegments = Default::default(); | |
let inflight_segments = InflightSegments::default(); |
if items.is_empty() { | ||
items.reserve(*this.requests_ready_chunks); | ||
} |
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.
can pull this out of the loop to initialization of items
if items.is_empty() { | ||
items.reserve(*this.requests_ready_chunks); | ||
} |
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.
then kill this
fn range(&self) -> Range<u64> { | ||
self.location.offset..self.location.offset + self.location.length as u64 | ||
} | ||
} | ||
|
||
impl From<(SegmentId, Segment, oneshot::Receiver<()>)> for SegmentRequest { |
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 from is way too cute, we should add a method directly on SegmentRequest
let nchunks = layout.nchildren() - (if layout.metadata().is_some() { 1 } else { 0 }); | ||
let mut offset = row_offset; | ||
for i in 0..nchunks { | ||
let child = layout.child(i, layout.dtype().clone(), format!("[{}]", i))?; |
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.
let child = layout.child(i, layout.dtype().clone(), format!("[{}]", i))?; | |
let child = layout.child(i, layout.dtype().clone(), format!("[{i}]"))?; |
}; | ||
|
||
let cancelled_segments: Vec<_> = { | ||
let mut store = self.store.write().vortex_expect("poisoned lock"); |
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.
let mut store = self.store.write().vortex_expect("poisoned lock"); | |
let mut store = self.store.write()?; |
No description provided.