diff --git a/src/controller/cluster.c b/src/controller/cluster.c index 58bd4db..bbe45a3 100644 --- a/src/controller/cluster.c +++ b/src/controller/cluster.c @@ -820,19 +820,23 @@ int cluster_init_phase2(cluster_t* c) mylock_init(&(c->sched.lock)); c->sched.ep = NULL; - resmgr_params.nslots = c->myconf->cluster_config->resmgr->nhash_slots; - resmgr_params.delta = c->myconf->cluster_config->resmgr->delta; - jobmgr_params.nslots = c->myconf->cluster_config->jobmgr->nhash_slots; - jobmgr_params.delta = c->myconf->cluster_config->jobmgr->delta; - workermgr_params.nslots = c->myconf->cluster_config->workermgr->nhash_slots; - workermgr_params.delta = c->myconf->cluster_config->workermgr->delta; - qmgr_params.nslots = c->myconf->cluster_config->qmgr->nhash_slots; - qmgr_params.delta = c->myconf->cluster_config->qmgr->delta; + /* TODO: replace with config-driven values once config generation tool is ready */ +#define CTRL_PERF_NHASH 512 +#define CTRL_PERF_DELTA 64 +#define CTRL_PERF_INST 64 + resmgr_params.nslots = CTRL_PERF_NHASH; + resmgr_params.delta = CTRL_PERF_DELTA; + jobmgr_params.nslots = CTRL_PERF_NHASH; + jobmgr_params.delta = CTRL_PERF_DELTA; + workermgr_params.nslots = CTRL_PERF_NHASH; + workermgr_params.delta = CTRL_PERF_DELTA; + qmgr_params.nslots = CTRL_PERF_NHASH; + qmgr_params.delta = CTRL_PERF_DELTA; c->configmgr = makeInstance(&xkvmgr_type, &config_mgr_params); c->jobmgr = makeInstance(&xkvmgr_type, &jobmgr_params); c->resmgr = makeInstance(&xkvmgr_type, &resmgr_params); - zarray_init(&(c->sharedinst), c->myconf->cluster_config->resmgr->inst_delta, + zarray_init(&(c->sharedinst), CTRL_PERF_INST, (zarray_item_killer_t)resval_obj_killer); c->workermgr = makeInstance(&xkvmgr_type, &workermgr_params); c->qmgr = makeInstance(&xkvmgr_type, &qmgr_params); @@ -848,7 +852,7 @@ int cluster_init_phase2(cluster_t* c) iomgr_set_ssl_ctx(&(c->iomgr), ssl_ctx); } - xstring_table_init(c->myconf->cluster_config->xstrings->nhash_slots); + xstring_table_init(CTRL_PERF_NHASH); job_obj_init(5381, 5381); zarray_init(&(c->endpoints), 16, endpoint_killer);