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: minor cleanup & refactoring #1248

Merged
merged 5 commits into from Oct 24, 2017

Conversation

Projects
None yet
4 participants
@chu11
Copy link
Contributor

chu11 commented Oct 24, 2017

As discussed in PR #1246, a minor cleanup & refactoring that I wanted to split off b/c it would involve additional API changes. This solves cleanup described in #1247.

chu11 added some commits Oct 24, 2017

modules/kvs/cache: Refactor clear dirty functions
Refactor cache_entry_clear_dirty().  Instead of returning the dirty
bit as the return value, return just success or error.  User can call
cache_entry_get_dirty() afterwards to check.

Refactor cache_entry_force_clear_dirty() to return just success or
error.  Returning value of dirty bit makes no sense, as it
will always be 0 if the function is successful.

Adjust callers and unit tests appropriately.
modules/kvs/cache: Code cleanup dirty bit
Convert dirty bit from uint8_t type to bool type.  Use true/false
instead of 1/0 throughout.

Fixes #1247
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 24, 2017

Codecov Report

Merging #1248 into master will increase coverage by <.01%.
The diff coverage is 80.95%.

@@            Coverage Diff             @@
##           master    #1248      +/-   ##
==========================================
+ Coverage   77.91%   77.92%   +<.01%     
==========================================
  Files         154      154              
  Lines       28902    28903       +1     
==========================================
+ Hits        22520    22522       +2     
+ Misses       6382     6381       -1
Impacted Files Coverage Δ
src/modules/kvs/kvs.c 62.88% <0%> (-0.09%) ⬇️
src/modules/kvs/commit.c 76.53% <100%> (-0.46%) ⬇️
src/modules/kvs/cache.c 88.72% <84.21%> (-0.11%) ⬇️
src/common/libflux/request.c 87.17% <0%> (-1.29%) ⬇️
src/common/libutil/dirwalk.c 93.57% <0%> (-0.72%) ⬇️
src/common/libflux/message.c 81.13% <0%> (-0.48%) ⬇️
src/common/libkvs/kvs.c 64.28% <0%> (-0.08%) ⬇️
src/broker/module.c 84.07% <0%> (+0.27%) ⬆️
src/common/libkvs/kvs_watch.c 87.22% <0%> (+0.88%) ⬆️
... and 1 more
@coveralls

This comment has been minimized.

Copy link

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.01%) to 78.535% when pulling 9a37bba on chu11:issue1247 into 0dfdcfc on flux-framework:master.

@garlick

This comment has been minimized.

Copy link
Member

garlick commented Oct 24, 2017

LGTM. Merge?

@chu11

This comment has been minimized.

Copy link
Contributor Author

chu11 commented Oct 24, 2017

yup, pretty simple cleanup

@garlick garlick merged commit 4e15246 into flux-framework:master Oct 24, 2017

4 checks passed

codecov/patch 80.95% of diff hit (target 77.91%)
Details
codecov/project 77.92% (+<.01%) compared to 0dfdcfc
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 78.535%
Details

@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.