Commit 062531fb authored by Matthieu Dorier's avatar Matthieu Dorier

corrected cases of 0-sized bulk handles

parent f0277d5c
......@@ -1133,6 +1133,7 @@ int sdskv_list_keys_with_prefix(sdskv_provider_handle_t provider,
}
/* create bulk handle to expose where the keys should be placed */
if(keys) {
hret = margo_bulk_create(provider->client->mid,
*max_keys, keys, ksizes,
HG_BULK_WRITE_ONLY,
......@@ -1141,7 +1142,7 @@ int sdskv_list_keys_with_prefix(sdskv_provider_handle_t provider,
ret = SDSKV_ERR_MERCURY;
goto finish;
}
}
/* create handle */
hret = margo_create(
......
......@@ -1771,6 +1771,7 @@ static void sdskv_list_keyvals_ult(hg_handle_t handle)
for(unsigned i = num_keys; i < vsizes.size(); i++) vsizes[i] = 0;
/* transfer the ksizes back to the client */
if(ksizes_bulk_size) {
hret = margo_bulk_transfer(mid, HG_BULK_PUSH, origin_addr,
in.ksizes_bulk_handle, 0, ksizes_local_bulk, 0, ksizes_bulk_size);
if(hret != HG_SUCCESS) {
......@@ -1778,8 +1779,10 @@ static void sdskv_list_keyvals_ult(hg_handle_t handle)
<< "(push from ksizes_local_bulk to in.ksizes_bulk_handle)" << std::endl;
throw SDSKV_ERR_MERCURY;
}
}
/* transfer the vsizes back to the client */
if(vsizes_bulk_size) {
hret = margo_bulk_transfer(mid, HG_BULK_PUSH, origin_addr,
in.vsizes_bulk_handle, 0, vsizes_local_bulk, 0, vsizes_bulk_size);
if(hret != HG_SUCCESS) {
......@@ -1787,6 +1790,7 @@ static void sdskv_list_keyvals_ult(hg_handle_t handle)
<< "(push from vsizes_local_bulk to in.vsizes_bulk_handle)" << std::endl;
throw SDSKV_ERR_MERCURY;
}
}
if(size_error)
throw SDSKV_ERR_SIZE;
......
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