Skip to content

fixes issue with fragmentation when the MTU size is set to 64 bytes #616

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

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

robertroeser
Copy link
Member

@robertroeser robertroeser commented Apr 11, 2019

Fix for issue #615

@robertroeser robertroeser force-pushed the bugfix/fragmentationRefCntBug branch from 6ec4540 to f4895c1 Compare April 11, 2019 21:59
@robertroeser robertroeser merged commit de7ee88 into develop Apr 12, 2019
@robertroeser robertroeser deleted the bugfix/fragmentationRefCntBug branch April 12, 2019 18:37
@@ -11,7 +11,7 @@
class DefaultPayloadDecoder implements PayloadDecoder {

@Override
public Payload apply(ByteBuf byteBuf) {
public synchronized Payload apply(ByteBuf byteBuf) {
Copy link
Member

Choose a reason for hiding this comment

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

Hi, @robertroeser! I've run a benchmark with multiple clients sending messages concurrently, and lock profiler (a part of async-profiler) showed that there was lock contention in DefaultPayloadDecoder which seems to be introduced in this PR.

Screen Shot 2019-11-29 at 6 42 24 pm

I've looked through the code, but it's not obvious to me why it requires synchronisation since the class seems to be stateless. So, I'm wondering whether this synchronized can be safely removed in which case I'll be happy to send a PR or it serves some reason.

Thanks :)

Copy link
Member

Choose a reason for hiding this comment

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

Hello, @SerCeMan!

Thanks for finding that. I guess that was done by mistake and there is no need to have synchronized keyword here.

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.

4 participants