-
Notifications
You must be signed in to change notification settings - Fork 50
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: flux_kvs_lookupat() should not assume namespaces and always take rootref #1971
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1971 +/- ##
==========================================
+ Coverage 80% 80.04% +0.04%
==========================================
Files 195 195
Lines 34986 35005 +19
==========================================
+ Hits 27990 28020 +30
+ Misses 6996 6985 -11
|
hmm, code coverage is a tad low b/c of some circumstances where rootref was always set or not always set. Let me add some tests and see if we can do better. |
re-pushed with a few tests for additional coverage. There is one area in |
58a3258
to
4077c99
Compare
doh, chain lint bug in test, repushed |
hit another SIGTERM like in #1949:
but no "not cleanly shutdown" message, which is strange. Restarting. |
A lookupat is passed a root reference, therefore it should not be concerned with a namespace. Adjust code in modules/kvs to not require a namespace to be specified when a lookup contains a root reference. Update tests and documentation accordingly. Fixes flux-framework#1970
For convenience, flux_kvs_lookupat() would call flux_kvs_lookup() if the at reference was NULL. Do not allow this, as it can lead to lead to inconsistencies in the future if namespaces are involved. Adjust callers appropriately.
rebased |
Looks good, and the missing coverage is mostly difficult to hit error paths. Thanks! |
flux_kvs_lookupat()
would lookup a namespace, which does not make sense given it takes a rootref. Also, the rootref was optional and would callflux_kvs_lookup()
if it was not set. This doesn't really make sense. So require a root reference to be passed in, don't callflux_kvs_lookup()
, and don't lookup a namespace.As a side effect, don't send a namespace in the lookup RPC if an at reference is mentioned. So in the kvs module, make it so a lookup rpc is required to specify a namespace OR a root reference, but does not require both.
Also fix up some stupid documentation and typos found along the way.