Remove num_threads as a parameter. (#1891)

* remove num_threads as a parameter.

* linting.

* add additional checks.

* Invoke TransferCompleted on failures.

* Fix issue with failed Gets on store.

* ray check status of writing object headers.

* fix mac issues.
This commit is contained in:
Melih Elibol
2018-04-14 15:22:59 -07:00
committed by Philipp Moritz
parent 6be73350c6
commit 6a84b1f26e
4 changed files with 26 additions and 27 deletions
+7 -5
View File
@@ -33,13 +33,11 @@ namespace ray {
struct ObjectManagerConfig {
/// The time in milliseconds to wait before retrying a pull
/// that failed due to client id lookup.
int pull_timeout_ms = 100;
/// Size of thread pool.
int num_threads = 2;
uint pull_timeout_ms = 100;
/// Maximum number of sends allowed.
int max_sends = 20;
int max_sends = 2;
/// Maximum number of receives allowed.
int max_receives = 20;
int max_receives = 2;
// TODO(hme): Implement num retries (to avoid infinite retries).
std::string store_socket_name;
};
@@ -190,6 +188,10 @@ class ObjectManager {
std::atomic<int> num_transfers_send_;
std::atomic<int> num_transfers_receive_;
/// Size of thread pool. This is the sum of
/// config_.max_sends and config_.max_receives
const int num_threads_;
/// Cache of locally available objects.
std::unordered_map<ObjectID, ObjectInfoT, UniqueIDHasher> local_objects_;