Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fd: fix failure detection bug #213

Merged
merged 4 commits into from
Jan 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/dist/failure_detector/failure_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,14 @@ bool failure_detector::end_ping_internal(::dsn::error_code err, const beacon_ack
return true;
}

// if ack is not from master meta, worker should not update its last send time
if (!ack.is_master) {
dwarn("node[%s] is not master, ack.primary_node[%s] is real master",
node.to_string(),
ack.primary_node.to_string());
return true;
}

// update last_send_time_for_beacon_with_ack
record.last_send_time_for_beacon_with_ack = beacon_send_time;
record.rejected = false;
Expand Down