Commit e15179c9 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

made the server not bug when list_keys/vals returns 0 item

parent 0c5c91ad
......@@ -697,6 +697,8 @@ static void sdskv_list_keys_ult(hg_handle_t handle)
auto keys = db->list_keys(start_kdata, in.max_keys, prefix);
hg_size_t num_keys = std::min(keys.size(), in.max_keys);
if(num_keys == 0) throw SDSKV_SUCCESS;
/* create the array of actual sizes */
std::vector<hg_size_t> true_ksizes(num_keys);
hg_size_t keys_bulk_size = 0;
......@@ -868,6 +870,8 @@ static void sdskv_list_keyvals_ult(hg_handle_t handle)
auto keyvals = db->list_keyvals(start_kdata, in.max_keys, prefix);
hg_size_t num_keys = std::min(keyvals.size(), in.max_keys);
if(num_keys == 0) throw SDSKV_SUCCESS;
/* create the array of actual key sizes */
std::vector<hg_size_t> true_ksizes(num_keys);
hg_size_t keys_bulk_size = 0;
......
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