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: Support FLUX_KVS_WATCH_WAITCREATE #1820

Merged
merged 5 commits into from Nov 9, 2018

Conversation

Projects
None yet
4 participants
@chu11
Copy link
Contributor

chu11 commented Nov 8, 2018

unlike my prior PR, this one should hopefully work :-)

Of particular note, add a kvs.namespace-created-<namespace> event to the main kvs module, so that the creation of a namespace can be subscribed to.

In addition, there was a racy bit in the tests that was fixed. In my prior PR, by nothing more than dumb luck, tests passed like 30-40 times in a row for me when testing locally, but failed in travis everytime.

@chu11 chu11 force-pushed the chu11:issue1651_3 branch from fb659d1 to ddecf5b Nov 8, 2018

@chu11

This comment has been minimized.

Copy link
Contributor Author

chu11 commented Nov 8, 2018

rebased on master, squashed a NO_CHAIN_LINT fix.

@chu11

This comment has been minimized.

Copy link
Contributor Author

chu11 commented Nov 8, 2018

hit a hang, restarted a builder

make[4]: Entering directory '/usr/src/flux-core-0.10.0-505-gdcad92f2/_build/sub/t'
  python/t0009-security.py:  PASS: N=2   PASS=2   FAIL=0 SKIP=0 XPASS=0 XFAIL=0
make[4]: Leaving directory '/usr/src/flux-core-0.10.0-505-gdcad92f2/_build/sub/t'
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated
@garlick

This comment has been minimized.

Copy link
Member

garlick commented Nov 9, 2018

Excellent job @chu11! I pulled this down and poked at it and it seems to work great. I think this makes the new watch implementation far more useful.

Needs a rebase.

chu11 added some commits Nov 1, 2018

common/libkvs: Refactor validate_lookup_flags
Refactor how validation of lookup flags are done, passing all
flags to validate_lookup_flags() and indicating if watch flags
are acceptable.

As a side affect, all flags are passed in kvs lookups.  There is
no need to clear FLUX_KVS_WATCH before a lookup.
modules/kvs-watch: Support FLUX_KVS_WATCH_WAITCREATE
When watching a kvs namespace or key, do not return
ENOTSUP / ENOENT if the namespace or key does not exist.
Instead, wait until it exists to return the initial value
to the user.

Fixes #1651
cmd/flux-kvs: Add --waitcreate option to kvs
Support in get and getroot commands.
modules/kvs: Add kvs.namespace-created-* event
When a namespace is initially created, send an event
kvs.namespace-created-<namespace> to potential subscribers.

@chu11 chu11 force-pushed the chu11:issue1651_3 branch from ddecf5b to 6aa819f Nov 9, 2018

@chu11

This comment has been minimized.

Copy link
Contributor Author

chu11 commented Nov 9, 2018

rebased

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Nov 9, 2018

Codecov Report

Merging #1820 into master will decrease coverage by <.01%.
The diff coverage is 81.69%.

@@            Coverage Diff             @@
##           master    #1820      +/-   ##
==========================================
- Coverage   79.72%   79.71%   -0.01%     
==========================================
  Files         189      189              
  Lines       34609    34672      +63     
==========================================
+ Hits        27591    27638      +47     
- Misses       7018     7034      +16
Impacted Files Coverage Δ
src/common/libkvs/kvs_getroot.c 89.33% <100%> (-0.15%) ⬇️
src/cmd/flux-kvs.c 81.89% <100%> (+0.08%) ⬆️
src/common/libkvs/kvs_lookup.c 81.65% <100%> (+0.55%) ⬆️
src/modules/kvs/kvs.c 65.41% <52.94%> (-0.49%) ⬇️
src/modules/kvs-watch/kvs-watch.c 76.07% <85.71%> (+0.72%) ⬆️
src/modules/connector-local/local.c 74.66% <0%> (-0.15%) ⬇️
src/cmd/flux-event.c 77.97% <0%> (ø) ⬆️
src/cmd/flux-module.c 85.58% <0%> (ø) ⬆️
src/common/libflux/message.c 81.64% <0%> (+0.12%) ⬆️
... and 1 more

@garlick garlick merged commit 49c3b6a into flux-framework:master Nov 9, 2018

3 checks passed

codecov/patch 81.69% of diff hit (target 79.72%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +1.96% compared to 4b04fdf
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
is specified, until 'count' values have been displayed.
is specified, until 'count' values have been displayed. If the
initial value does not yet exist, `-W` can be specified to wait for it
to be crated.

This comment has been minimized.

@SteVwonder

SteVwonder Nov 9, 2018

Member

Sorry for not catching this earlier. (copy and pasted later on in the .adoc too)

crated -> created

This comment has been minimized.

@chu11

chu11 Nov 9, 2018

Author Contributor

oops ... I'll stick that fix onto my next PR.

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.