-
Notifications
You must be signed in to change notification settings - Fork 593
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
feat: support sequential exchange #14795
Conversation
It changes the memory usage from |
src/batch/src/task/task_execution.rs
Outdated
impl Drop for TaskOutput { | ||
fn drop(&mut self) { | ||
println!("drop TaskOutput {:?}", self.output_id); | ||
} | ||
} |
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.
Previously, for small limit queries, this struct could not be dropped timely.
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.
Under a constant workload of limit queries. It could cause a OOM.
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.
Interesting, maybe we can use this test to check why task leak happens. Let me take a look later.
CN oom, I think it is related to the early stop of the limit execution. |
Let's take a look at the sysbench. |
Are we sure this is the cause? Please at least run a sysbench test to verify it before merging. |
+1 |
We'd better identify the root cause of the regression before applying any other optimizations to avoid getting things more complicated. 🥺 |
Previous CN memory: Heap dump of the OOM: |
It has achieved 300% performance improvement and much more stable memory consumption under this workload. |
The root cause is small limit queries would fire more tasks as needed in the exchange operators, but when the limit query is ended, those fired tasks cannot be |
This issue reminds me of the backfill prefetch streaming read OOM issue. Both of them share the same behavior. |
while let Some(data_chunk) = stream.next().await { | ||
let data_chunk = data_chunk?; | ||
yield data_chunk | ||
let streams = self |
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.
How about move this part to the self.sequential
block? It's not easy to understand the difference of collection.
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.
LGTM, thanks!
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 we document what sequential
is somewhere in the code? It seems to be not very intuitive.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.