[fix] the new leader do not degrade crashed server when arbitration_timeout is larger than 10s

This commit is contained in:
BinChenn
2023-10-13 05:40:00 +00:00
committed by ob-robot
parent c7a7d23cfc
commit 9cb41a41d6
9 changed files with 57 additions and 3 deletions

View File

@ -64,7 +64,8 @@ bool MockNetKeepAliveAdapter::in_black_or_stopped(const common::ObAddr &server)
bool MockNetKeepAliveAdapter::is_server_stopped(const common::ObAddr &server)
{
return log_deliver_->need_filter_packet_by_blacklist(server);
UNUSED(server);
return false;
}
bool MockNetKeepAliveAdapter::in_black(const common::ObAddr &server)
@ -72,6 +73,17 @@ bool MockNetKeepAliveAdapter::in_black(const common::ObAddr &server)
return log_deliver_->need_filter_packet_by_blacklist(server);
}
int MockNetKeepAliveAdapter::get_last_resp_ts(const common::ObAddr &server,
int64_t &last_resp_ts)
{
if (log_deliver_->need_filter_packet_by_blacklist(server)) {
last_resp_ts = 1;
} else {
last_resp_ts = common::ObTimeUtility::current_time();
}
return OB_SUCCESS;
}
uint32_t get_local_addr(const char *dev_name)
{
int fd, intrface;