Skip to content

Add Exit Idle to LbPolicy Trait #2332

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cjqzhao
Copy link

@cjqzhao cjqzhao commented Jul 7, 2025

Add exit_idle to LbPolicy Trait and Child Manager.

@dfawley @easwars


fn exit_idle(&mut self, channel_controller: &mut dyn ChannelController) {
todo!()
// TODO(cjzhao): add exit idle logic once everything has been merged in
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that the todo! macro accepts a string that is printed when it is encountered, which might be nicer. Just todo!("implement exit_idle") seems fine.

Comment on lines 147 to 148
/// Called by policy when it needs to exit the idle state and start connecting
/// to subchannels.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a method on the policy, so it is called by the channel when it wants the lb policy to connect.

@dfawley dfawley added this to the grpc-next milestone Jul 8, 2025
@@ -219,6 +219,11 @@ impl<T: PartialEq + Hash + Eq + Send> LbPolicy for ChildManager<T> {
fn work(&mut self, _channel_controller: &mut dyn ChannelController) {
todo!();
}

fn exit_idle(&mut self, channel_controller: &mut dyn ChannelController) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix the CI error that happened for this line.

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.

2 participants