Skip to content

Conversation

@petrosagg
Copy link
Contributor

The existing capture/replay mechamism would produce a concatenation of bincode encoded messages. However, on the receiving end the bincode format does not have enough information for messages to be decoded accurately from a non-delimited stream, which could lead to the receiving end getting confused.

This PR fixes the issue by prefixing each messages with its length in bytes.

///
/// worker.dataflow::<u64,_,_>(|scope1|
/// std::thread::scope(move |s| {
/// s.spawn(move || timely::example(move |scope1| {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the two sides in separate threads since if one operator blocks while writing to the socket nothing will unblock it

The existing capture/replay mechamism would produce a concatenation of
bincode encoded messages. However, on the receiving end the bincode
format does not have enough information for messages to be decoded
accurately from a non-delimited stream, which could lead to the
receiving end getting confused.

This PR fixes the issue by prefixing each messages with its length in
bytes.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Copy link
Member

@frankmcsherry frankmcsherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and tyvm!

@frankmcsherry frankmcsherry merged commit 7f5b66e into TimelyDataflow:master Aug 14, 2025
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants