change error code name of boost timer (#9417)

This commit is contained in:
kisuke95
2020-07-14 11:50:58 +08:00
committed by GitHub
parent 3c90f960fb
commit 276fe109c5
5 changed files with 7 additions and 7 deletions
@@ -146,8 +146,8 @@ void ServiceBasedGcsClient::PeriodicallyCheckGcsServerAddress() {
RayConfig::instance().gcs_service_address_check_interval_milliseconds());
detect_timer_->expires_from_now(check_period);
detect_timer_->async_wait([this](const boost::system::error_code &error) {
if (error == boost::system::errc::operation_canceled) {
// `operation_canceled` is set when `detect_timer_` is canceled or destroyed.
if (error == boost::asio::error::operation_aborted) {
// `operation_aborted` is set when `detect_timer_` is canceled or destroyed.
return;
}
RAY_CHECK(!error) << "Checking gcs server address failed with error: "
+2 -2
View File
@@ -99,8 +99,8 @@ void GcsNodeManager::NodeFailureDetector::ScheduleTick() {
RayConfig::instance().raylet_heartbeat_timeout_milliseconds());
detect_timer_.expires_from_now(heartbeat_period);
detect_timer_.async_wait([this](const boost::system::error_code &error) {
if (error == boost::system::errc::operation_canceled) {
// `operation_canceled` is set when `detect_timer_` is canceled or destroyed.
if (error == boost::asio::error::operation_aborted) {
// `operation_aborted` is set when `detect_timer_` is canceled or destroyed.
// The Monitor lifetime may be short than the object who use it. (e.g. gcs_server)
return;
}
@@ -221,7 +221,7 @@ void GcsPlacementGroupScheduler::CancelResourceReserve(
return_timer_.expires_from_now(boost::posix_time::milliseconds(5));
return_timer_.async_wait(
[this, bundle_spec, node](const boost::system::error_code &error) {
if (error == boost::system::errc::operation_canceled) {
if (error == boost::asio::error::operation_aborted) {
return;
} else {
CancelResourceReserve(bundle_spec, node);
@@ -52,7 +52,7 @@ void GcsRedisFailureDetector::ScheduleTick() {
RayConfig::instance().gcs_redis_heartbeat_interval_milliseconds());
detect_timer_.expires_from_now(detect_period);
detect_timer_.async_wait([this](const boost::system::error_code &error) {
if (error == boost::system::errc::operation_canceled) {
if (error == boost::asio::error::operation_aborted) {
return;
}
RAY_CHECK(!error) << "Detecting redis failed with error: " << error.message();
+1 -1
View File
@@ -21,7 +21,7 @@ inline void execute_after(boost::asio::io_context &io_context,
auto timer = std::make_shared<boost::asio::deadline_timer>(io_context);
timer->expires_from_now(boost::posix_time::milliseconds(delay_milliseconds));
timer->async_wait([timer, fn](const boost::system::error_code &error) {
if (error != boost::system::errc::operation_canceled && fn) {
if (error != boost::asio::error::operation_aborted && fn) {
fn();
}
});