-
Notifications
You must be signed in to change notification settings - Fork 590
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: remove drop_actors rpc and simplify barrier worker state #18354
Conversation
@@ -416,32 +424,27 @@ impl PartialGraphManagedBarrierState { | |||
} | |||
} | |||
|
|||
pub(super) struct ManagedBarrierState { | |||
pub(crate) struct ManagedBarrierState { | |||
pub(super) actor_states: HashMap<ActorId, InflightActorState>, |
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.
May I know what "inflight" in InflightActor
is for?
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.
It has no special meaning. I guess the name was following the InflightActorInfo
previously in the meta node global barrier manager.
if let Some(actors_to_stop) = barrier.all_stop_actors() { | ||
self.current_shared_context.drop_actors(actors_to_stop); | ||
} |
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.
Can we also move this clean-up step into collect -> is_finished
?
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.
At the beginning I implement it in this way, but later I realize that we also need to clean up the actor infos in other compute node, but the collect -> is_finished
can only clean up the actor on this compute node. So now I changed to clean up 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!
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Extension of #18270.
In #18270, we spawn actor in inject barrier, and there is no not-started actor any more. In this PR, we further simplify the actor state of local barrier worker. The
NotStarted
actor status is removed, and all actor related info, including join handles, are all managed in theInflightActorState
andStreamActorManagerState
is removed.The
drop_actors
rpc is removed, because there is no need to use it. The drop actor info is carried in the barrier, and the info of the dropped actor can be removed when the barrier is completed locally.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.