Skip to content

[Bug] Fix remoting server netty server codec thread reuse problem #9992

@ymwneu

Description

@ymwneu

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

OS: Cross-platform (Issue found via static code analysis)

RocketMQ version

Branch: develop

JDK Version

JDK 1.8

Describe the Bug

When creating NettyRemotingServer, if the serverNettyWorkerGroupEnable parameter is set to false, Netty’s codec and handshake will use Netty’s built-in thread pool. However, some other parts of this class still use the business-layer–created defaultEventExecutorGroup. In this case, Netty’s codec may behave abnormally.

Steps to Reproduce

  1. Set serverNettyWorkerGroupEnable to false.
  2. Decoding fails / throws errors on some connections.
Image

What Did You Expect to See?

All data received by the server can be encoded and decoded correctly.

What Did You See Instead?

Encoding/decoding is abnormal for data received by some servers.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions