Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
kvs: have two request handlers for commits & fences #1349
Instead of sending all commit and fence RPCs to the same kvs handler, have one for commits (
This makes the code far clearer on how commits and fences are different.
A) commits do not require "nprocs" and "name" to be sent in their RPCs, so they are now removed.
B) a nice chunk of code is not needed for commits b/c nprocs is always 1 (i.e. don't need to do a lookup), so all that code is now removed in the commit path.
This completes issue #1344.
I was curious if this would improve performance, as commits are now far simpler than fences (less allocations, etc.). A soak test showed:
Granted only 1 run over 1000 jobs, but mean is a tad better.
I'd probably drop the commit that diverts fence to commit if fence nprocs=1, since that left turn isn't likely justified by any real world benefit.
In the commit request callback, it looks like a uuid is still being created, but on the server side. Is that necessary? If it is, it might actually be better to do it on the client side to distribute the workload rather than concentrating it on the leader rank.
Slightly unrelated to this PR, but the duplication of the rpc call in the client (my fault) looks to be just to avoid creating an empty ops array? I'm not sure that works out to be helpful, since jansson probably just creates it internally from
Yeah. It's b/c there is shared code for commits & fences returning success/error codes to the original callers. I need a name to attach to an RPC message for later lookup. This is all in the
That sounds like a good idea.
Are you suggesting we create an empty ops array if the user passes in txn == NULL? I suppose that would clean it up a bit overall.
Sounds good, although I'll leave that to a different PR. I'll make an issue.
@@ Coverage Diff @@ ## master #1349 +/- ## ========================================== - Coverage 78.55% 78.51% -0.04% ========================================== Files 162 162 Lines 29619 29686 +67 ========================================== + Hits 23266 23307 +41 - Misses 6353 6379 +26