-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[PERF]: pipeline segment committing/flushing #3360
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
220a7ee
to
c81c89f
Compare
c81c89f
to
1e493ab
Compare
2e9a2e0
to
d09d690
Compare
1e493ab
to
ad6e0db
Compare
ad6e0db
to
3b1a65f
Compare
d09d690
to
894663c
Compare
3b1a65f
to
a37ca15
Compare
// Result Channel | ||
result_channel: Option<Sender<Result<CompactionResponse, CompactionError>>>, | ||
max_compaction_size: usize, | ||
max_partition_size: usize, | ||
// Populated during the compaction process | ||
cached_segments: Option<Vec<Segment>>, | ||
writers: OnceCell<CompactWriters>, | ||
flush_results: Vec<SegmentFlushInfo>, | ||
// We track a parent span for each segment type so we can group all the spans for a given segment type (makes the resulting trace much easier to read) | ||
segment_spans: HashMap<SegmentUuid, Span>, |
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.
<3
a37ca15
to
8ff398b
Compare
num_write_tasks: i32, | ||
// Tracks the total remaining number of MaterializeLogs tasks | ||
num_uncompleted_materialization_tasks: usize, | ||
// Tracks the total remaining number of tasks per segment |
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 is write tasks + commit tasks + flush tasks right?
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.
yep
34de5a2
to
d165237
Compare
Description of changes
This introduces two new operators that allow committing and flushing individual segments. This enables pipelining across all segment types.
Some changes in service of this:
write_to_blockfiles()
is renamed to a genericfinish()
method on theSegmentWriter
trait.An example trace (with two partitions):
Screen.Recording.2024-11-20.at.5.09.37.PM.mov
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustAlso tested with SciDocs.
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
n/a