Skip to content
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

Cyclonedds has lost some messages #2118

Open
Gummum opened this issue Oct 26, 2024 · 3 comments
Open

Cyclonedds has lost some messages #2118

Gummum opened this issue Oct 26, 2024 · 3 comments

Comments

@Gummum
Copy link

Gummum commented Oct 26, 2024

When I use dds_get_matched_subscriptions to detect subscribers, I start sending messages. But some frames from the beginning will be lost.

@Gummum
Copy link
Author

Gummum commented Oct 26, 2024

Could it be that there is a period of time between the discovery of subscriber and subscriber availability? Can you tell me if there is a state of judgment?

@eboasson
Copy link
Contributor

That should never happen for a reliable, keep-all, volatile writer-reader pair. The deal in Cyclone is that everything written by writer W after reader R is listed as a matched reader should make it to R, and nothing that was sent before R was matched.

Now if it is a keep-last writer or reader and you're writing quickly (but not so quickly that you don't overwrite any data in steady state) it is possible that the handshake causes a sample to be overwritten. If it is not reliable, then that handshake isn't there so then the loss would only be because of packet loss.

For transient-local, clearly there is the historical data to account for as well. It takes some time to fetch and deliver everything in-order and that increases the window for overwriting data in the writer history. But otherwise it is quite like volatile.

Do you happen to have a small reproducer?

@Gummum
Copy link
Author

Gummum commented Oct 29, 2024

So the implication is that there is no such time.

Could it be that there is a period of time between the discovery of subscriber and subscriber availability?

I wonder if there's a bug that needs to be fixed if the mechanism is not working this way.

I tested this on my embedded device. My testing method was to create a pub process on the device and start my sub process to receive data after a certain period of time (approximately 3-5 seconds).

The result could be that the pub dds_write succeeded 10 times, but sub only received 7 messages.

How can I help you?! I really want to participate in the maintenance of the project, and I am very interested in dds!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants