Skip to content
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_key() #1414

Merged
merged 3 commits into from Apr 2, 2018

Conversation

Projects
None yet
4 participants
@garlick
Copy link
Member

garlick commented Apr 2, 2018

When writing code that uses flux_kvs_lookup() with continuations, it's useful to be able to access the original key from within the continuation, so the continuation can be shared for multiple lookups This PR adds an accessor for the key.

Tests and docs updated.

libkvs/kvs_lookup: add flux_kvs_lookup_get_key()
Problem: a single callback cannnot be used for multiple
KVS lookup futures, unless the key is added to the aux
hash, which is cumbersome.

The key is already there in the lookup context.
Add an accessor.
@coveralls

This comment has been minimized.

Copy link

coveralls commented Apr 2, 2018

Coverage Status

Coverage increased (+0.02%) to 78.872% when pulling 829afd9 on garlick:kvs_getkey into 0d32cd3 on flux-framework:master.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Apr 2, 2018

Codecov Report

Merging #1414 into master will increase coverage by <.01%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #1414      +/-   ##
==========================================
+ Coverage   78.54%   78.54%   +<.01%     
==========================================
  Files         163      163              
  Lines       30003    30008       +5     
==========================================
+ Hits        23567    23571       +4     
- Misses       6436     6437       +1
Impacted Files Coverage Δ
src/common/libkvs/kvs_lookup.c 78.47% <100%> (+0.77%) ⬆️
src/cmd/flux-kvs.c 80.91% <57.14%> (ø) ⬆️
src/broker/modservice.c 79.61% <0%> (-0.98%) ⬇️
src/common/libutil/dirwalk.c 93.57% <0%> (-0.72%) ⬇️
src/common/libflux/message.c 80.89% <0%> (-0.48%) ⬇️
src/common/libflux/future.c 88.31% <0%> (-0.47%) ⬇️
src/common/libflux/msg_handler.c 86.64% <0%> (-0.37%) ⬇️
src/broker/overlay.c 74.45% <0%> (-0.32%) ⬇️
src/cmd/flux-module.c 85.06% <0%> (-0.31%) ⬇️
src/common/libflux/request.c 88.46% <0%> (ø) ⬆️
... and 6 more

@garlick garlick force-pushed the garlick:kvs_getkey branch from 37c4d74 to 829afd9 Apr 2, 2018

@grondo

This comment has been minimized.

Copy link
Contributor

grondo commented Apr 2, 2018

Restarted a builder stuck after the t4000-issues-test-driver.t.
I wonder what's going on there?

@garlick

This comment has been minimized.

Copy link
Member Author

garlick commented Apr 2, 2018

Thanks for doing that! I don't know, seems to be a recurring issue.

@grondo grondo merged commit f5f765c into flux-framework:master Apr 2, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 78.872%
Details

@garlick garlick deleted the garlick:kvs_getkey branch Apr 3, 2018

@grondo grondo referenced this pull request May 10, 2018

Closed

0.9.0 Release #1479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.