-
Notifications
You must be signed in to change notification settings - Fork 98
Fix error case in node connection procedure. #246
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
Conversation
In case if new connection to remote EndPoint failed to create, this means that all reliable connections (that are used in d-p) also failed. As a result this means that we need to emit `Died (node) Disconnect` event. Previously we emited `Died typeOfReceiver Disconnect` event.
This should come with a regression test. |
This test fixes test suite, it no longer randomly hangs (on TCP) and stop failing on inmemory. Does it count as a regression test, or we need explicit one? |
Which test(s) in the test suite? It ought to be possible to write a test that consistently hangs currently, on consistently does not hang with this patch. |
I'll think how to write such test, not sure that I see a simple way now. |
LGTM |
Fix error case in node connection procedure.
@facundominguez So is this a workaround that should be backed out once the tests are fixed, are did we merge a semantic fix here? |
This is a workaround in case if EventConnectionLost message is guaranteed to happen in case of connection/send failure by n-t semantics. |
I don't understand the above comment. You mean, we decree that the node disconnected in the case where we know all connections to some given endpoint died all at once? Just in case we never do get the |
No. I mean that if we try to connect to another node using reliable ordered connection (CH case) and
Am I clear now? |
Yes, that is a bit clearer. I think the workaround is wrong.
|
Hm, forget point (1) - there is the "bundle" story of course. Which was up for discussion previously. |
Ok yes - point (1) is valid I think: the send didn't necessarily fail because of a connection failure. Signing out now, because second guessing after dinner messages I wrote before dinner not working too well. |
And error on send means connection failure, this means that all "bundle" goes down, and as we have no way to distinguish between a bundles this should mean that all "bundles" goes down. Seems like that chapter states that guarantees are very similar to what I wanted, and this fix will be redundant then. On the other side seems that this fix will not play well with unreliable sends and monitoring. But I think we need to introduce a desirable semantics and tests for that as a separate task. |
In case if new connection to remote EndPoint failed to create,
this means that all reliable connections (that are used in d-p)
also failed. As a result this means that we need to emit
Died (node) Disconnect
event. Previously we emitedDied typeOfReceiver Disconnect
event.