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

Use duplicates when writing from ByteBuf pair to avoid multiple threads issues #1203

Merged
merged 1 commit into from
Feb 8, 2018

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented Feb 8, 2018

Motivation

This is a fix for #1201.

The truncation happens when, during an unload, the topic moves from one broker to another. If the write operation on the previous connection was still ongoing, it can cause issues when the new IO (associated with the "new" connection) will start writing on the new socket.

Modifications

Take a duplicate of theByteBuf so that each thread will have its own readerIndex on the buffer.

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Feb 8, 2018
@merlimat merlimat added this to the 1.22.0-incubating milestone Feb 8, 2018
@merlimat merlimat self-assigned this Feb 8, 2018
@merlimat
Copy link
Contributor Author

merlimat commented Feb 8, 2018

@jai1 @rdhabalia PTAL at this one

Copy link
Contributor

@rdhabalia rdhabalia left a comment

Choose a reason for hiding this comment

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

👍

@merlimat merlimat merged commit feb0acc into apache:master Feb 8, 2018
@merlimat merlimat deleted the fix-producer-corruption branch February 8, 2018 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants