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
Send() -> Sent<> mapping underspecified #336
Comments
As stated in the PR, I'd prefer to see The point about receiving send errors is interesting—and I'd argue that the messageContext is not what you want to associate errors with. When you're sending partial messages, you have one MessageContext across multiple send operations. The first 10 sends on a message context can succeed, and then the eleventh can fail. The error should be associated with the call to |
The mapping between sends and error events is indeed complicated and worth an issue on its own:
I still think returning a message context on error events is the right thing to do, but mapping it to the message context passed to send will, indeed, be much more complicated. |
It multiple I don't think in general a "packet" really has anything to do with the API surface for sending here, and that's a distraction to the API contract. |
I agree that the notion of "packet" does not belong into the API, but thinking about packetization is necessary to understand all error cases. I am not really convinced that we can and should really match all sends with errors: Let's consider the following (extreme) case:
|
Please see section 7.3.1:
That means that any Send operation that has successfully enqueued its data into the send buffer will have received a Sent event. Acknowledgement is not an event delivered to the application. In the case you gave, the following will happen upon a RST, as always should happen upon a RST:
All other Send operations that did enqueue data would have already delivered the Sent event, and are no longer relevant for delivering errors. |
Decided in Montréal: no, send() should not return a MessageContext, it should be passed one. |
I think "it must always be passed one" was the agreed outcome, right? |
Yes, I'm in favor of each Send must have either exactly one Sent Event or a SendError event. We didn't confirm consensus though. |
Rollback. I meant something else, and just created unnecessary confusion, I'm afraid.
|
This closes first half of Issue #336
Resolved in Montréal: there is a 1:1 relationship between Send() and Sent<>. Text needs to be clear on this. |
Fixed with 46ec43c |
(Accidentally pushed this to master instead of to a PR branch—pretty small diff. If you want to change something there, let me know!) |
PR #321 added a return value to the Send to make matching of send error events and reply messages to their originating message easier:
@tfpauly raised the concern that this this adds return value that most often is not needed and ignoring it may often trigger a warning.
Therefore, we have to decide whether to keep the return value based on what is worse:
The text was updated successfully, but these errors were encountered: