Commit 8aea6b58 authored by David Rich's avatar David Rich Committed by Rob Latham
Browse files

Go back to using margo_create. The bug recently fixed was not related to using...

Go back to using margo_create. The bug recently fixed was not related to using this versus HG_Create.
parent 061047da
......@@ -62,10 +62,8 @@ hg_return_t kv_open(kv_context *context, const char *server_addr, const char *db
ret = margo_addr_lookup(context->mid, server_addr, &(context->svr_addr));
assert(ret == HG_SUCCESS);
// grab hg_context for mid
hg_context_t *hg_context = margo_get_context(context->mid);
ret = HG_Create(hg_context, context->svr_addr,
context->open_id, &handle);
ret = margo_create(context->mid, context->svr_addr,
context->open_id, &handle);
assert(ret == HG_SUCCESS);
open_in.name = (char*)db_name;
......@@ -80,23 +78,23 @@ hg_return_t kv_open(kv_context *context, const char *server_addr, const char *db
/* put/get handles: can have as many in flight as we have registered.
* BAKE has a handle-caching mechanism we should consult.
* should margo be caching handles? */
ret = HG_Create(hg_context, context->svr_addr,
context->put_id, &(context->put_handle));
ret = margo_create(context->mid, context->svr_addr,
context->put_id, &(context->put_handle));
assert(ret == HG_SUCCESS);
ret = HG_Create(hg_context, context->svr_addr,
context->bulk_put_id, &(context->bulk_put_handle));
ret = margo_create(context->mid, context->svr_addr,
context->bulk_put_id, &(context->bulk_put_handle));
assert(ret == HG_SUCCESS);
ret = HG_Create(hg_context, context->svr_addr,
context->get_id, &(context->get_handle));
ret = margo_create(context->mid, context->svr_addr,
context->get_id, &(context->get_handle));
assert(ret == HG_SUCCESS);
ret = HG_Create(hg_context, context->svr_addr,
context->bulk_get_id, &(context->bulk_get_handle));
ret = margo_create(context->mid, context->svr_addr,
context->bulk_get_id, &(context->bulk_get_handle));
assert(ret == HG_SUCCESS);
ret = HG_Create(hg_context, context->svr_addr,
context->bench_id, &(context->bench_handle));
ret = margo_create(context->mid, context->svr_addr,
context->bench_id, &(context->bench_handle));
assert(ret == HG_SUCCESS);
ret = HG_Create(hg_context, context->svr_addr,
context->shutdown_id, &(context->shutdown_handle));
ret = margo_create(context->mid, context->svr_addr,
context->shutdown_id, &(context->shutdown_handle));
assert(ret == HG_SUCCESS);
margo_free_output(handle, &open_out);
......@@ -191,10 +189,8 @@ hg_return_t kv_close(kv_context *context)
put_in_t close_in;
put_out_t close_out;
// grab hg_context for mid
hg_context_t *hg_context = margo_get_context(context->mid);
ret = HG_Create(hg_context, context->svr_addr,
context->close_id, &handle);
ret = margo_create(context->mid, context->svr_addr,
context->close_id, &handle);
assert(ret == HG_SUCCESS);
ret = margo_forward(handle, &close_in);
assert(ret == HG_SUCCESS);
......@@ -220,10 +216,8 @@ bench_result *kv_benchmark(kv_context *context, int count) {
ret = margo_create(context->mid, context->svr_addr,
context->bench_id, &(context->bench_handle) );
// grab hg_context for mid
hg_context_t *hg_context = margo_get_context(context->mid);
ret = HG_Create(hg_context, context->svr_addr,
context->bench_id, &handle);
ret = margo_create(context->mid, context->svr_addr,
context->bench_id, &handle);
assert(ret == HG_SUCCESS);
bench_in.count = count;
ret = margo_forward(context->bench_handle, &bench_in);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment