Skip to content

Commit

Permalink
fix: meta cannot save heartbeats when cluster have no region
Browse files Browse the repository at this point in the history
  • Loading branch information
fengys1996 committed Nov 15, 2023
1 parent f659f99 commit 4a60863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/meta-srv/src/handler/collect_stats_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ impl HeartbeatHandler for CollectStatsHandler {

match Stat::try_from(req.clone()) {
Ok(stat) => {
// If stat is empty, it means the request is a mailbox response
if !stat.is_empty() {
let _ = acc.stat.insert(stat);
}
let _ = acc.stat.insert(stat);
}
Err(err) => {
warn!("Incomplete heartbeat data: {:?}, err: {:?}", req, err);
Expand Down
1 change: 1 addition & 0 deletions src/meta-srv/src/handler/mailbox_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ impl HeartbeatHandler for MailboxHandler {
) -> Result<()> {
if let Some(message) = &req.mailbox_message {
ctx.mailbox.on_recv(message.id, Ok(message.clone())).await?;
ctx.set_skip_all();
}

Ok(())
Expand Down

0 comments on commit 4a60863

Please sign in to comment.