-
Notifications
You must be signed in to change notification settings - Fork 51
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: Make getroot() asynchronous #1315
Conversation
Might want to use the same function naming style as the adjacent "load" async calls, e.g. |
Codecov Report
@@ Coverage Diff @@
## master #1315 +/- ##
==========================================
- Coverage 78.29% 78.21% -0.08%
==========================================
Files 154 155 +1
Lines 28133 28189 +56
==========================================
+ Hits 22026 22049 +23
- Misses 6107 6140 +33
|
@garlick Ahh, good idea. |
Make getroot() kvs namespace initialization call asynchronous instead of synchronous. Involved is creation of callback data structure to be used in response continuations.
67e5931
to
c708ccb
Compare
I think your approach is reasonable @chu11. Thanks for pushing this through. Would it make sense to move |
Possibly a If we talked about this before and I'm not remembering the result, apologies in advance! |
Ya know, the first time I looked at making a I would agree another refactoring is in order. |
Use new msg_cb_handler internal API instead of the getroot_handler functions that were previously developed.
Use new msg_cb_handler internal API instead of prior msg handler code.
Since this PR wasn't merged yet, I went ahead and created a new abstraction |
Change parameter inputs to be consistent to msg_cb_handler API.
and I added a few cleanup patches along the way too. |
Apologies for the delay getting back to this! There might be an opportunity to simplify this further by storing intermediate message processing state (such as a lookup_t) in the message itself using I guess that might be a topic for another PR though. Since this works and looks solid, I'll go ahead and merge. I'll open an issue on the potential simplification. |
Per discussion in #1197, make
getroot()
call asynchronous.In this PR, a
struct getroot_handler
was added to handle information needed in getroot continuation calls. Two design notes on this:The getroot call is needed in kvs.get, kvs.watch, kvs.sync, and kvs.fence. This collection of request handlers were different enough from each other that it seemed more work than would be reasonable to place the getroot call within the lookup interface, commit interface, and whatever I would do for kvs.sync. So I elected to handle getroot asynchronous-ness outside of those interfaces.
This getroot handler code is 90% similar to what is in
waitqueue.c
code. But b/c of the abstraction ofwait_t
, I couldn't quite exploit using it. Refactoring a common "callback handler" set of functions could be done, but I punted on this for the time being.