mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
[xray] Implementing Gcs sharding (#2409)
Basically a re-implementation of #2281, with modifications of #2298 (A fix of #2334, for rebasing issues.). [+] Implement sharding for gcs tables. [+] Keep ClientTable and ErrorTable managed by the primary_shard. TaskTable is managed by the primary_shard for now, until a good hashing for tasks is implemented. [+] Move AsyncGcsClient's initialization into Connect function. [-] Move GetRedisShard and bool sharding from RedisContext's connect into AsyncGcsClient. This may make the interface cleaner.
This commit is contained in:
committed by
Robert Nishihara
parent
eda6ebb87d
commit
5b45f0bdff
@@ -351,11 +351,6 @@ LocalSchedulerState *LocalSchedulerState_init(
|
||||
state->db = db_connect(std::string(redis_primary_addr), redis_primary_port,
|
||||
"local_scheduler", node_ip_address, db_connect_args);
|
||||
db_attach(state->db, loop, false);
|
||||
|
||||
RAY_CHECK_OK(state->gcs_client.Connect(std::string(redis_primary_addr),
|
||||
redis_primary_port, true));
|
||||
RAY_CHECK_OK(state->gcs_client.context()->AttachToEventLoop(loop));
|
||||
RAY_CHECK_OK(state->gcs_client.primary_context()->AttachToEventLoop(loop));
|
||||
} else {
|
||||
state->db = NULL;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,6 @@ struct LocalSchedulerState {
|
||||
std::unordered_map<ActorID, ActorMapEntry> actor_mapping;
|
||||
/** The handle to the database. */
|
||||
DBHandle *db;
|
||||
/** The handle to the GCS (modern version of the above). */
|
||||
ray::gcs::AsyncGcsClient gcs_client;
|
||||
/** The Plasma client. */
|
||||
plasma::PlasmaClient *plasma_conn;
|
||||
/** State for the scheduling algorithm. */
|
||||
|
||||
Reference in New Issue
Block a user