Skip to content
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(streaming): permit-based back-pressure in exchange #6170

Merged
merged 11 commits into from
Nov 7, 2022

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Nov 2, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

Implement the permit-based back-pressure in exchange. doc

Take TPCH Q12 mentioned in the doc as an example:

Before:
image

After:
image

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Merging #6170 (0b4ed77) into main (df0c3f4) will increase coverage by 0.01%.
The diff coverage is 74.78%.

@@            Coverage Diff             @@
##             main    #6170      +/-   ##
==========================================
+ Coverage   74.18%   74.19%   +0.01%     
==========================================
  Files         944      945       +1     
  Lines      152310   152387      +77     
==========================================
+ Hits       112992   113066      +74     
- Misses      39318    39321       +3     
Flag Coverage Δ
rust 74.19% <74.78%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/batch/src/execution/local_exchange.rs 56.84% <0.00%> (ø)
src/common/src/config.rs 70.41% <ø> (ø)
src/compute/src/rpc/service/exchange_service.rs 0.00% <0.00%> (ø)
src/stream/src/task/stream_manager.rs 2.55% <20.00%> (-0.16%) ⬇️
src/stream/src/executor/exchange/output.rs 44.44% <50.00%> (+1.23%) ⬆️
src/stream/src/executor/exchange/permit.rs 90.69% <90.69%> (ø)
src/rpc_client/src/compute_client.rs 59.20% <96.42%> (+6.36%) ⬆️
src/stream/src/executor/dispatch.rs 69.27% <100.00%> (ø)
src/stream/src/executor/exchange/input.rs 80.24% <100.00%> (ø)
src/stream/src/executor/integration_tests.rs 98.42% <100.00%> (ø)
... and 8 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@BugenZhao BugenZhao changed the title feat(streaming): permit-based exchange feat(streaming): permit-based back-pressure in exchange Nov 2, 2022
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@BugenZhao BugenZhao marked this pull request as ready for review November 3, 2022 09:13
@yuhao-su
Copy link
Contributor

yuhao-su commented Nov 4, 2022

LGTM!

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mergify mergify bot merged commit 2ac0c8d into main Nov 7, 2022
@mergify mergify bot deleted the bz/permit-exchange branch November 7, 2022 04:24
st1page pushed a commit that referenced this pull request Nov 16, 2022
* add channel

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* remote permits

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* extract batched permits

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* add license header

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* remove const

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* add doc

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* add more doc

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* gen ts proto

* add more doc

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
mergify bot pushed a commit that referenced this pull request Feb 21, 2023
The hanging channel is a channel that's external for a table fragments subgraph. We introduced this for MV on MV long ago, but after #4045 and #6170, this becomes not that necessary: we can simply create a pair of channels if not found in the `ChannelPool`.

https://github.com/risingwavelabs/risingwave/blob/b1891423a68b98dff39d7220a891cdea8bd67951/src/stream/src/task/mod.rs#L123-L138

This is a preparation step for #7908.

Approved-By: yezizp2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants