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

add additional warning on WriteMessages() #1139

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

replay
Copy link
Contributor

@replay replay commented May 31, 2023

We have used pooled byte slices for the Message's .Value, after .WriteMessages() returned we re-used these byte slices and modified their content, this has lead to corrupted data being written when .WriteMessages() returned early due to a canceled context.

With this PR I'd like to make the warning in the comment a bit more explicit.

Signed-off-by: Mauro Stettler mauro.stettler@gmail.com

A bit more context on stack overflow

Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
Copy link
Collaborator

@rhansen2 rhansen2 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@rhansen2 rhansen2 merged commit ce799ad into segmentio:main Jun 15, 2023
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