New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kvs: add flux_kvs_lookup_get_raw() #1218
Conversation
LGTM, will hit button after it passes. |
actually, one nit, I have a |
Ah sorry I missed that. That commit is now just a one line change to the test (and removal of the TODO). |
Hang on typo in that one, fix coming. |
Does the new API function need an entry in |
Yes :-/ |
Codecov Report
@@ Coverage Diff @@
## master #1218 +/- ##
==========================================
- Coverage 78.21% 78.21% -0.01%
==========================================
Files 158 158
Lines 29283 29297 +14
==========================================
+ Hits 22904 22914 +10
- Misses 6379 6383 +4
|
OK, man pages all straightened out for these functions, plus fixed some Makefile.am errors in the man3 directory (broken out to separate commits) |
doc/man3/flux_kvs_txn_create.adoc
Outdated
@@ -31,6 +31,10 @@ SYNOPSIS | |||
int flux_kvs_txn_symlink (flux_kvs_txn_t *txn, int flags, | |||
const char *key, const char *target); | |||
|
|||
int flux_kvs_txn_put_raw (flux_kvs_txn_t *txn, int flags, | |||
const char *key, void *data, int len); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const void *data
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might be looking at an older version there? This is already done.
I probably shouldn't have forced pushed a squashed version back there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still shows up void *
to me. This is the adoc, not the header file.
also |
Ah thanks, just pushed a fix. |
Restarted one builder due to #1145 write error. |
looks good to me, squash away |
Call flux_kvs_lookup_get_raw() with bad parameters and make sure it fails with errno == EINVAL.
Problem: copy-tokvs and copy-fromkvs use custom JSON encapsulated base64 encoding to store raw data. Use flux_kvs_txn_put_raw() and flux_kvs_lookup_get_raw().
Add test that creates a 'valref' entry in the KVS pointing to content stored out of band. Read the raw content back in with flux_kvs_lookup_get_raw(). Fixes flux-framework#1216
Store a zero length raw value and read it back. Fixes flux-framework#1215
Problem: Makefile.am dependencies were not updated when lookup functions were renamed. Fix names.
Problem: Makefile.am dependencies were not added for flux_kvs_txn_symlink(3). Add the dependency.
Thanks, squashed. |
LGTM, will hit button after passes travis |
This PR adds
flux_kvs_lookup_get_raw()
to the KVS API, to go withflux_kvs_txn_put_raw()
, then modifiest/kvs/basic
to use them instead of an extra base64 encoding layer forcopy-tokvs
andcopy-fromkvs
subcommands. Finally add a couple of sharness tests to fill test gaps identified in #1214 (lookup unencoded content) and #1215 (zero length value).This is based on top of #1214