feat: flow state size (#193)
* feat: add flow state size * chore: protoc * refactor: use FlowId not uint64 * fix: use uint32 * chore: make
This commit is contained in:
@@ -47,6 +47,7 @@ message HeartbeatRequest {
|
||||
// The node's epoch
|
||||
uint64 node_epoch = 7;
|
||||
NodeInfo info = 8;
|
||||
FlowStat flow_stat = 9;
|
||||
}
|
||||
|
||||
enum RegionRole {
|
||||
@@ -54,9 +55,11 @@ enum RegionRole {
|
||||
Leader = 0;
|
||||
// Readonly region.
|
||||
Follower = 1;
|
||||
// A downgrading region, which is in the process of downgrading from Leader to Follower.
|
||||
//
|
||||
// This role is used to prevent the region from being written during the downgrade process.
|
||||
// A downgrading region, which is in the process of downgrading from Leader to
|
||||
// Follower.
|
||||
//
|
||||
// This role is used to prevent the region from being written during the
|
||||
// downgrade process.
|
||||
DowngradingLeader = 2;
|
||||
}
|
||||
|
||||
@@ -84,6 +87,13 @@ message RegionStat {
|
||||
map<string, bytes> extensions = 99;
|
||||
}
|
||||
|
||||
message FlowStat {
|
||||
// Each flow's in mem state's size in bytes
|
||||
// due to protobuf's key can't be a message, so we use uint32 as the key which
|
||||
// is [`FlowId`]'s inner field `id`
|
||||
map<uint32, uint64> flow_stat_size = 1;
|
||||
}
|
||||
|
||||
message HeartbeatResponse {
|
||||
ResponseHeader header = 1;
|
||||
MailboxMessage mailbox_message = 2;
|
||||
|
||||
Reference in New Issue
Block a user