-
Notifications
You must be signed in to change notification settings - Fork 173
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
feat: add start/stop extension markers for fragment chain #1597
feat: add start/stop extension markers for fragment chain #1597
Conversation
A fragment chain must begin with a start marker, otherwise the whole chain will be dropped. When a fragmented message is dropped by congestion control, a final fragment with stop marker must be emitted. Because no batch is available, an ephemeral batch, i.e. not recycled in the pipeline after, is created.
PR missing one of the required labels: {'documentation', 'internal', 'new feature', 'dependencies', 'breaking-change', 'bug', 'enhancement'} |
I've checked, it doesn't change the size of `WBatch`
028fd8e
to
ad8d0a4
Compare
@Mallets I've moved |
I think for backward compatibility we still need to address two main points:
Finally, I wonder if we could add the information about the total message length in the start marker. The total length could be eventually used to preallocate a single buffer to copy the message on. I understand this would require changing quite a bit the deserialisation code. As well, it's still unclear to me the real impact on performance. |
It's handled by dropping the fragment. I don't see a way to provide backward compatibility here, that was my main concern about this change.
I don't think it's a good idea regarding routing, because the message would be refragmented right after. However, on the client side, it would allow to avoid |
Still, adding the size on start extension doesn't cost anything and is still a nice information to have when debugging, so why not adding it. |
It's about improving the behaviour for future Zenoh versions (especially in patch release) without requiring dropping old versions (i.e. that would require bumping the protocol version). A viable option is to start by default in no start marker mode and as soon as start marker is detected we switch mode. Alternatevely, we could handle this in a |
It costs bytes on the network. If we don't have a use for it, let's not send it. |
I prefer an |
After a second thought I also prefer the |
@Mallets I came to the conclusion that both ends don't need to agree on a patch version, i.e. selecting the minimum of both. In fact, each end can just keep the other's patch version, and let the code do the rest. |
I agree with the reasoning. However, the |
It does. I will roll back the minimum check. Then I will have to find a proper error code in zenoh-pico... |
784cb4c
to
e4883f4
Compare
@Mallets Should we store minimum patch version in |
I'd say yes. |
This PR LGTM. However, I prefer to wait for having eclipse-zenoh/zenoh-pico#813 tested and approved before merging. |
The lint error came from the recently 1.83 release. I will fix it while resolving the conflict. By the way, zeno-pico PR has been approved. |
# Conflicts: # io/zenoh-transport/src/common/pipeline.rs
A fragment chain must begin with a start marker, otherwise the whole chain will be dropped.
When a fragmented message is dropped by congestion control, a final fragment with stop marker must be emitted. Because no batch is available, an ephemeral batch, i.e. not recycled in the pipeline after, is created.