Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
sds-keyval
Commits
062531fb
Commit
062531fb
authored
Aug 01, 2019
by
Matthieu Dorier
Browse files
corrected cases of 0-sized bulk handles
parent
f0277d5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sdskv-client.c
View file @
062531fb
...
...
@@ -1133,16 +1133,17 @@ int sdskv_list_keys_with_prefix(sdskv_provider_handle_t provider,
}
/* create bulk handle to expose where the keys should be placed */
hret
=
margo_bulk_create
(
provider
->
client
->
mid
,
if
(
keys
)
{
hret
=
margo_bulk_create
(
provider
->
client
->
mid
,
*
max_keys
,
keys
,
ksizes
,
HG_BULK_WRITE_ONLY
,
&
in
.
keys_bulk_handle
);
if
(
hret
!=
HG_SUCCESS
)
{
ret
=
SDSKV_ERR_MERCURY
;
goto
finish
;
if
(
hret
!=
HG_SUCCESS
)
{
ret
=
SDSKV_ERR_MERCURY
;
goto
finish
;
}
}
/* create handle */
hret
=
margo_create
(
provider
->
client
->
mid
,
...
...
src/sdskv-server.cc
View file @
062531fb
...
...
@@ -1771,21 +1771,25 @@ 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 */
hret
=
margo_bulk_transfer
(
mid
,
HG_BULK_PUSH
,
origin_addr
,
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
)
{
std
::
cerr
<<
"Error: SDSKV list_keyvals could not issue bulk transfer "
<<
"(push from ksizes_local_bulk to in.ksizes_bulk_handle)"
<<
std
::
endl
;
throw
SDSKV_ERR_MERCURY
;
if
(
hret
!=
HG_SUCCESS
)
{
std
::
cerr
<<
"Error: SDSKV list_keyvals could not issue bulk transfer "
<<
"(push from ksizes_local_bulk to in.ksizes_bulk_handle)"
<<
std
::
endl
;
throw
SDSKV_ERR_MERCURY
;
}
}
/* transfer the vsizes back to the client */
hret
=
margo_bulk_transfer
(
mid
,
HG_BULK_PUSH
,
origin_addr
,
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
)
{
std
::
cerr
<<
"Error: SDSKV list_keyvals could not issue bulk transfer "
<<
"(push from vsizes_local_bulk to in.vsizes_bulk_handle)"
<<
std
::
endl
;
throw
SDSKV_ERR_MERCURY
;
if
(
hret
!=
HG_SUCCESS
)
{
std
::
cerr
<<
"Error: SDSKV list_keyvals could not issue bulk transfer "
<<
"(push from vsizes_local_bulk to in.vsizes_bulk_handle)"
<<
std
::
endl
;
throw
SDSKV_ERR_MERCURY
;
}
}
if
(
size_error
)
...
...
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