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): handle multiple edges with no-op fragment #9320

Merged
merged 9 commits into from
Apr 23, 2023

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Apr 20, 2023

Signed-off-by: Bugen Zhao [email protected]I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

As explained in #9319. When the fragment graph builder on the frontend finds it going to add a second edge between the fragments, it'll manually introduce a fragment with a single NoOp operator ("unknown" below) and insert it between them. The exchange between the upstream and NoOp will be NoShuffle, while the one between NoOp and the downstream will be the original shuffle type. This is the solution 1.2 proposed in Multiple Edges in the Stream Graph.

I've also tried to do this in optimizer, but eventually found the approach in this PR most intuitive and accurate: it only inserts NoOp if necessary and no false positives exist. BTW, since we've found that NoShuffle exchange is much more friendly to scaling than we thought after #8694, I guess we may have no fear about that. :)

image

Resolve #9319.

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
@BugenZhao BugenZhao marked this pull request as ready for review April 21, 2023 06:54
@BugenZhao BugenZhao requested a review from chenzl25 April 21, 2023 06:56
Signed-off-by: Bugen Zhao <[email protected]>
Copy link
Contributor

@chenzl25 chenzl25 left a comment

Choose a reason for hiding this comment

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

LGTM! What an interesting case.

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #9320 (e8165f8) into main (0c381b2) will decrease coverage by 0.01%.
The diff coverage is 74.07%.

@@            Coverage Diff             @@
##             main    #9320      +/-   ##
==========================================
- Coverage   70.79%   70.79%   -0.01%     
==========================================
  Files        1225     1227       +2     
  Lines      203343   203448     +105     
==========================================
+ Hits       143955   144026      +71     
- Misses      59388    59422      +34     
Flag Coverage Δ
rust 70.79% <74.07%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/stream/src/executor/mod.rs 50.95% <ø> (ø)
src/stream/src/executor/no_op.rs 0.00% <0.00%> (ø)
src/stream/src/from_proto/mod.rs 0.00% <ø> (ø)
src/stream/src/from_proto/no_op.rs 0.00% <0.00%> (ø)
...tend/src/stream_fragmenter/graph/fragment_graph.rs 97.40% <100.00%> (+0.57%) ⬆️
src/frontend/src/stream_fragmenter/mod.rs 79.83% <100.00%> (+7.26%) ⬆️

... and 5 files with indirect coverage changes

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

Signed-off-by: Bugen Zhao <[email protected]>
@BugenZhao BugenZhao enabled auto-merge April 21, 2023 08:50
@BugenZhao BugenZhao added this pull request to the merge queue Apr 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 21, 2023
@BugenZhao BugenZhao added this pull request to the merge queue Apr 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 21, 2023
@BugenZhao BugenZhao added this pull request to the merge queue Apr 23, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 23, 2023
@BugenZhao BugenZhao enabled auto-merge April 23, 2023 03:42
@BugenZhao BugenZhao added this pull request to the merge queue Apr 23, 2023
Merged via the queue into main with commit 2f62af4 Apr 23, 2023
@BugenZhao BugenZhao deleted the bz/multiple-edges branch April 23, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: fragmenter panicked when creating a self-join graph with multiple edges
2 participants