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

refactor: no need to resolve hanging channel #8050

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Feb 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?

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.

/// Get the channel pair for the given actor ids. If the channel pair does not exist, create one
/// with the configured permits.
fn get_or_insert_channels(
&self,
ids: UpDownActorIds,
) -> MappedMutexGuard<'_, ConsumableChannelPair> {
MutexGuard::map(self.channel_map.lock(), |map| {
map.entry(ids).or_insert_with(|| {
let (tx, rx) = permit::channel(
self.config.developer.stream_exchange_initial_permits,
self.config.developer.stream_exchange_batched_permits,
);
(Some(tx), Some(rx))
})
})
}

This is a preparation step for #7908.

Checklist

  • 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).
  • 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)

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

Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
@shanicky
Copy link
Contributor

This PR is so successful...

@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #8050 (2e6c1e5) into main (fbaf524) will increase coverage by 0.03%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##             main    #8050      +/-   ##
==========================================
+ Coverage   71.33%   71.37%   +0.03%     
==========================================
  Files        1128     1128              
  Lines      181648   181490     -158     
==========================================
- Hits       129581   129532      -49     
+ Misses      52067    51958     -109     
Flag Coverage Δ
rust 71.37% <63.63%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
src/compute/src/rpc/service/stream_service.rs 0.00% <0.00%> (ø)
src/meta/src/barrier/recovery.rs 68.06% <ø> (-0.14%) ⬇️
src/meta/src/stream/scale.rs 12.45% <0.00%> (+0.36%) ⬆️
src/meta/src/stream/stream_graph/schedule.rs 92.71% <ø> (-0.12%) ⬇️
src/meta/src/stream/stream_manager.rs 78.34% <ø> (+3.30%) ⬆️
src/stream/src/task/stream_manager.rs 1.79% <0.00%> (-0.70%) ⬇️
src/stream/src/task/mod.rs 58.53% <85.71%> (-0.50%) ⬇️
src/stream/src/executor/dispatch.rs 82.64% <100.00%> (-0.24%) ⬇️
src/stream/src/executor/merge.rs 90.55% <100.00%> (-0.11%) ⬇️
src/stream/src/executor/receiver.rs 84.31% <100.00%> (-0.21%) ⬇️
... and 12 more

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

Copy link
Member

@yezizp2012 yezizp2012 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 c4516de into main Feb 21, 2023
@mergify mergify bot deleted the bz/schema-change-meta-part-3 branch February 21, 2023 07:13
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.

3 participants