Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sds-keyval
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
sds-keyval
Commits
7cfe6965
Commit
7cfe6965
authored
Aug 28, 2019
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing list_keys so that passing NULL will request sizes
parent
501aa9b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
src/sdskv-client.c
src/sdskv-client.c
+18
-1
No files found.
src/sdskv-client.c
View file @
7cfe6965
...
...
@@ -1143,6 +1143,10 @@ int sdskv_list_keys_with_prefix(sdskv_provider_handle_t provider,
int
ret
=
SDSKV_SUCCESS
;
int
i
;
if
(
*
max_keys
==
0
)
{
return
SDSKV_SUCCESS
;
}
in
.
db_id
=
db_id
;
in
.
start_key
.
data
=
(
kv_ptr_t
)
start_key
;
in
.
start_key
.
size
=
start_ksize
;
...
...
@@ -1164,8 +1168,21 @@ int sdskv_list_keys_with_prefix(sdskv_provider_handle_t provider,
goto
finish
;
}
/* make sure none of the buffers is NULL or 0-sized */
int
requesting_sizes
=
0
;
if
(
keys
==
NULL
)
{
requesting_sizes
=
1
;
}
else
{
for
(
i
=
0
;
i
<
*
max_keys
;
i
++
)
{
if
(
keys
[
i
]
==
NULL
||
ksizes
[
i
]
==
0
)
{
requesting_sizes
=
1
;
break
;
}
}
}
/* create bulk handle to expose where the keys should be placed */
if
(
key
s
)
{
if
(
!
requesting_size
s
)
{
hret
=
margo_bulk_create
(
provider
->
client
->
mid
,
*
max_keys
,
keys
,
ksizes
,
HG_BULK_WRITE_ONLY
,
...
...
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