Throw exception for ray.get of an evicted actor object (#3490)

* Add a flag for whether an object has been created before

* Add regression test

* doc

* Share object directory between object and node managers

* Treat evicted actor tasks as failed

* minor

* Check return value

* Fix bug where object locations weren't getting updated on client death

* Fix mac build

* Use RayTaskError
This commit is contained in:
Stephanie Wang
2018-12-14 11:41:27 -08:00
committed by GitHub
parent 7fd24e384b
commit fcc37021b2
15 changed files with 313 additions and 124 deletions
+3 -12
View File
@@ -70,25 +70,16 @@ class ObjectManagerInterface {
// TODO(hme): Add success/failure callbacks for push and pull.
class ObjectManager : public ObjectManagerInterface {
public:
/// Implicitly instantiates Ray implementation of ObjectDirectory.
///
/// \param main_service The main asio io_service.
/// \param config ObjectManager configuration.
/// \param gcs_client A client connection to the Ray GCS.
explicit ObjectManager(boost::asio::io_service &main_service,
const ObjectManagerConfig &config,
std::shared_ptr<gcs::AsyncGcsClient> gcs_client);
/// Takes user-defined ObjectDirectoryInterface implementation.
/// When this constructor is used, the ObjectManager assumes ownership of
/// the given ObjectDirectory instance.
///
/// \param main_service The main asio io_service.
/// \param config ObjectManager configuration.
/// \param od An object implementing the object directory interface.
/// \param object_directory An object implementing the object directory interface.
explicit ObjectManager(boost::asio::io_service &main_service,
const ObjectManagerConfig &config,
std::unique_ptr<ObjectDirectoryInterface> od);
std::shared_ptr<ObjectDirectoryInterface> object_directory);
~ObjectManager();
@@ -363,7 +354,7 @@ class ObjectManager : public ObjectManagerInterface {
ClientID client_id_;
const ObjectManagerConfig config_;
std::unique_ptr<ObjectDirectoryInterface> object_directory_;
std::shared_ptr<ObjectDirectoryInterface> object_directory_;
ObjectStoreNotificationManager store_notification_;
ObjectBufferPool buffer_pool_;