-
Notifications
You must be signed in to change notification settings - Fork 47
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
Cluster state types #2311
Cluster state types #2311
Conversation
345539a
to
61fe276
Compare
7f721f2
to
190361d
Compare
1f17889
to
7def569
Compare
46f4206
to
7837086
Compare
#[serde_as] | ||
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] | ||
pub struct NodeData { | ||
pub timestamp: MillisSinceEpoch, |
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.
what does timestamp refer to 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.
That should be last_update_time
. I will rename it
cb5630b
to
b3973f4
Compare
Summary: derprecate old cluster state that included information about partition state. A new ClusterState object is introduced that only have livenss information
Summary: Types used by nodes to share cluster state
super::define_rpc! { | ||
@request=GetNodeState, | ||
@response=NodeStateResponse, | ||
@request_target=TargetName::NodeGetNodeStateRequest, | ||
@response_target=TargetName::NodeGetNodeStateResponse, | ||
@request=GetPartitionsProcessorsState, | ||
@response=PartitionsProcessorsStateResponse, | ||
@request_target=TargetName::NodeGetPartitionsProcessorsStateRequest, | ||
@response_target=TargetName::NodeGetPartitionsProcessorsStateResponse, | ||
} | ||
|
||
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize)] | ||
pub struct GetNodeState {} | ||
pub struct GetPartitionsProcessorsState {} | ||
|
||
#[serde_as] | ||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub struct NodeStateResponse { | ||
pub struct PartitionsProcessorsStateResponse { | ||
/// State of paritions processor per parition. Is set to None if this node is not a `Worker` node | ||
#[serde_as(as = "Option<serde_with::Seq<(_, _)>>")] | ||
pub partition_processor_state: Option<BTreeMap<PartitionId, PartitionProcessorStatus>>, |
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.
possibly we should rename the module to be src/net/worker.rs
since this worker-specific messaging and not node-level anymore.
Cluster state types
Summary:
Types used by nodes to share cluster state
Stack created with Sapling. Best reviewed with ReviewStack.
ClusterState
types #2434