mirror of
https://github.com/wassname/ray.git
synced 2026-08-10 12:30:14 +08:00
Fix pull manager retry (#12907)
This commit is contained in:
@@ -89,14 +89,7 @@ ObjectManager::ObjectManager(asio::io_service &main_service, const NodeID &self_
|
||||
static_cast<int64_t>(1L),
|
||||
static_cast<int64_t>(config_.max_bytes_in_flight / config_.object_chunk_size))));
|
||||
|
||||
pull_retry_timer_.async_wait([this](const boost::system::error_code &e) {
|
||||
RAY_CHECK(!e) << "The raylet's object manager has failed unexpectedly with error: "
|
||||
<< e
|
||||
<< ". Please file a bug report on here: "
|
||||
"https://github.com/ray-project/ray/issues";
|
||||
|
||||
Tick();
|
||||
});
|
||||
pull_retry_timer_.async_wait([this](const boost::system::error_code &e) { Tick(e); });
|
||||
|
||||
if (plasma::plasma_store_runner) {
|
||||
store_notification_ = std::make_shared<ObjectStoreNotificationManager>(main_service);
|
||||
@@ -814,6 +807,16 @@ void ObjectManager::RecordMetrics() const {
|
||||
stats::ObjectManagerPullRequests().Record(pull_manager_->NumActiveRequests());
|
||||
}
|
||||
|
||||
void ObjectManager::Tick() { pull_manager_->Tick(); }
|
||||
void ObjectManager::Tick(const boost::system::error_code &e) {
|
||||
RAY_CHECK(!e) << "The raylet's object manager has failed unexpectedly with error: " << e
|
||||
<< ". Please file a bug report on here: "
|
||||
"https://github.com/ray-project/ray/issues";
|
||||
|
||||
pull_manager_->Tick();
|
||||
|
||||
auto interval = boost::posix_time::milliseconds(config_.timer_freq_ms);
|
||||
pull_retry_timer_.expires_from_now(interval);
|
||||
pull_retry_timer_.async_wait([this](const boost::system::error_code &e) { Tick(e); });
|
||||
}
|
||||
|
||||
} // namespace ray
|
||||
|
||||
@@ -284,7 +284,7 @@ class ObjectManager : public ObjectManagerInterface,
|
||||
/// Record metrics.
|
||||
void RecordMetrics() const;
|
||||
|
||||
void Tick();
|
||||
void Tick(const boost::system::error_code &e);
|
||||
|
||||
private:
|
||||
friend class TestObjectManager;
|
||||
@@ -458,7 +458,6 @@ class ObjectManager : public ObjectManagerInterface,
|
||||
const RestoreSpilledObjectCallback restore_spilled_object_;
|
||||
|
||||
/// Pull manager retry timer .
|
||||
/* std::unique_ptr<boost::asio::deadline_timer> pull_retry_timer_; */
|
||||
boost::asio::deadline_timer pull_retry_timer_;
|
||||
|
||||
/// Object push manager.
|
||||
|
||||
Reference in New Issue
Block a user