-
Notifications
You must be signed in to change notification settings - Fork 594
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(frontend): support streaming_parallelism session variable. #7370
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7370 +/- ##
=======================================
Coverage 72.92% 72.92%
=======================================
Files 1071 1071
Lines 172382 172418 +36
=======================================
+ Hits 125711 125739 +28
- Misses 46671 46679 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
let default_parallelism = if self.env.opts.minimal_scheduling { | ||
let default_parallelism = if let Some(parallelism) = parallelism { | ||
parallelism as usize | ||
} else if self.env.opts.minimal_scheduling { |
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.
I guess it's time to remove this option, as it can be achieved by setting the variable, which sounds more flexible.
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.
Removed.
proto/ddl_service.proto
Outdated
@@ -88,6 +88,7 @@ message DropSinkResponse { | |||
message CreateMaterializedViewRequest { | |||
catalog.Table materialized_view = 1; | |||
stream_plan.StreamFragmentGraph fragment_graph = 2; | |||
uint64 parallelism = 3; |
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.
Is it okay to put it into FragmentGraph
? As it only makes sense for the streaming jobs, that is, with a graph
in the DDL request. Seems this graph is not persisted and only used for the communication.
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.
Make sense. Fixed.
# Conflicts: # dashboard/proto/gen/stream_plan.ts # proto/stream_plan.proto # src/frontend/src/handler/create_mv.rs
proto/stream_plan.proto
Outdated
@@ -617,4 +622,6 @@ message StreamFragmentGraph { | |||
repeated uint32 dependent_table_ids = 3; | |||
uint32 table_ids_cnt = 4; | |||
StreamEnvironment env = 5; | |||
// 0 means use default value. | |||
uint64 parallelism = 6; |
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.
Should we use the Parallelism
message here? 👀
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 for the work!
Should the batch query jobs i.e. |
Do you mean default parallelism of the non-scan stages? Good catch. 🤔 |
Yes, exactly. |
BTW, another example is |
Yes. |
Maybe we need another |
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
streaming_parallelism
precedes default parallelism.minimal_scheduling
, becausestreaming_parallelism
is more flexible to use.The streaming_parallelism session var takes effect for
TBD:
streaming_parallelism
?Checklist
- [ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features)../risedev check
(or alias,./risedev c
)Documentation
If your pull request contains user-facing changes, please specify the types of the changes, and create a release note. Otherwise, please feel free to remove this section.
Types of user-facing changes
Please keep the types that apply to your changes, and remove those that do not apply.
Release note
Support streaming_parallelism session variable. It's not set by default, which results in using default parallelism of the cluster.
Refer to a related PR or issue link (optional)
#7359