-
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: Return error that occurs in kvs.relayfence #1309
kvs: Return error that occurs in kvs.relayfence #1309
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1309 +/- ##
==========================================
+ Coverage 78.22% 78.23% +0.01%
==========================================
Files 154 154
Lines 27941 27954 +13
==========================================
+ Hits 21857 21871 +14
+ Misses 6084 6083 -1
|
While driving home, it occurred to me that I implemented this backwards. The original |
Ugh ... never mind that prior comment. I was confusing |
bc1f61b
to
1e9dbd3
Compare
rebased on master and pushed. Expecting near 0% diff coverage. |
Just checking: does this new error path ensure that at most one event is generated per commit? It does seem like you could shorten |
Yes. Basically if we reach Good point, |
In the event an error occurs within relayfence there was no way to return an error to the original client requests. Return an error via the error_event_send() path similar to how an error can occur during a commit error.
1e9dbd3
to
0879a26
Compare
re-based and re-pushed |
Great thanks! |
Note that this PR comes after #1308 (patches in #1308 are included here). I will rebase after #1308 is merged in.
I originally had this patch mixed in with my remove namespace PR, but it seems independent of everything else, so I've now spliced it into its own PR.
The
relayfence_request_cb()
function presently does not return an error to the original rpc fence/commit request if an error occurs within this function. An error could be returned to the user only within thecommit_apply()
path of the code if we reached that path and an error occurred within there.This patch fixes the problem by effectively calling the error path from
commit_apply()
if an error occurs within this function.Unfortunately, outside of some serious code instrumentation, this patch is basically untestable and I bet will have about 0% diff coverage. The error paths are either "impossible" paths or extreme racey paths.