Skip to content

support change ownship for SelectiveChannel#3198

Merged
yanglimingcn merged 1 commit intoapache:masterfrom
altman08:master
Jan 21, 2026
Merged

support change ownship for SelectiveChannel#3198
yanglimingcn merged 1 commit intoapache:masterfrom
altman08:master

Conversation

@altman08
Copy link
Copy Markdown

What problem does this PR solve?

Issue Number: resolve

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects:

  • Breaking backward compatibility:


Check List:

@yanglimingcn
Copy link
Copy Markdown
Contributor

LGTM

Comment thread src/brpc/selective_channel.h Outdated
Comment on lines +72 to +84
int AddChannel(ChannelBase* sub_channel, ChannelHandle* handle) {
return AddChannel(sub_channel, "", OWNS_CHANNEL, handle);
}
int AddChannel(ChannelBase* sub_channel, const std::string& tag,
ChannelHandle* handle) {
return AddChannel(sub_channel, tag, OWNS_CHANNEL, handle);
}
int AddChannel(ChannelBase* sub_channel, ChannelOwnership ownership,
ChannelHandle* handle) {
return AddChannel(sub_channel, "", ownership, handle);
}
int AddChannel(ChannelBase* sub_channel, const std::string& tag,
ChannelOwnership ownership, ChannelHandle* handle);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think AddChannel has a combinatorial explosion problem.

int AddChannel(SelectiveChannel::SubChannelOptions);

Using the SubChannelOptions overloaded AddChannel function would be more suitable, as it offers better extensibility.

In the meantime, please update the comments for the AddChannel function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

agree

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

@altman08 altman08 force-pushed the master branch 3 times, most recently from 89ea0d5 to 05d8424 Compare January 20, 2026 02:44
Comment thread src/brpc/selective_channel.h
@yanglimingcn
Copy link
Copy Markdown
Contributor

LGTM

1 similar comment
@wwbmmm
Copy link
Copy Markdown
Contributor

wwbmmm commented Jan 20, 2026

LGTM

Comment thread src/brpc/selective_channel.h
Comment thread src/brpc/selective_channel.h
Copy link
Copy Markdown
Contributor

@chenBright chenBright left a comment

Choose a reason for hiding this comment

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

LGTM

@yanglimingcn yanglimingcn merged commit b3b43cc into apache:master Jan 21, 2026
17 checks passed
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.

4 participants