Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
sds-keyval
Commits
e15179c9
Commit
e15179c9
authored
Feb 07, 2018
by
Matthieu Dorier
Browse files
made the server not bug when list_keys/vals returns 0 item
parent
0c5c91ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sdskv-server.cc
View file @
e15179c9
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment