Remove the RAY_CHECK in Worker::Port() (#9348)

This commit is contained in:
Kai Yang 2020-07-10 18:06:25 +08:00 committed by GitHub
parent a98cd0670e
commit c89b59cf48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,12 @@ Language Worker::GetLanguage() const { return language_; }
const std::string Worker::IpAddress() const { return ip_address_; }
int Worker::Port() const {
RAY_CHECK(port_ > 0);
// NOTE(kfstorm): Since `RayletClient::AnnounceWorkerPort` is an asynchronous
// operation, the worker may crash before the `AnnounceWorkerPort` request is received
// by raylet. In this case, Accessing `Worker::Port` in
// `NodeManager::ProcessDisconnectClientMessage` will fail the check. So disable the
// check here.
// RAY_CHECK(port_ > 0);
return port_;
}