You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "iloveeyjafjalla (via GitHub)" <gi...@apache.org> on 2026/10/13 04:34:53 UTC

[PR] [ISSUE #11396] fix(remoting): apply serverSocketBacklog to the accept backlog [rocketmq]

iloveeyjafjalla opened a new pull request, #11397:
URL: https://github.com/apache/rocketmq/pull/11397

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11396
   
   ### Brief Description
   
   `serverSocketBacklog` is a settable option (field, getter/setter, and the `rocketmq.remoting.socket.backlog` system property)
   whose getter has no production reader, because `NettyRemotingServer#initServerBootstrap` passes a literal to Netty:
   
   ```java
   .option(ChannelOption.SO_BACKLOG, 1024)
   ```
   
   This is a regression of #3528/#3529 ("The value of ChannelOption.SO_BACKLOG can not be hard-coded"), which made the bootstrap
   read the option — the RIP-31 BrokerContainer refactor reverted that line while keeping the field, its accessors and the
   system property. Consequently a broker/nameserver whose operator raises the backlog for connection bursts keeps accepting
   with a 1024-deep listen queue, and the value echoed by the configuration looks as if it were applied.
   
   The change passes `nettyServerConfig.getServerSocketBacklog()` to the bootstrap, restoring the behaviour of #3529. It is the
   only listening socket created inside the module, so one line covers broker, nameserver and the proxy's remoting server.
   
   ### How Did You Test This Change?
   
   Extended `NettyRemotingServerTest` with `serverSocketBacklogIsAppliedToTheBootstrap`: it configures 65535 on the server
   config, builds a real `NettyRemotingServer`, runs `initServerBootstrap` on a fresh `ServerBootstrap` and asserts the
   `SO_BACKLOG` option carries the configured value.
   
   Results on Temurin JDK 8 (same JDK as CI), base `a7edeecfb` plus this patch:
   
   - before the fix: `java.lang.AssertionError: expected:<65535> but was:<1024>`
   - after the fix: `NettyRemotingServerTest`, `NettyRemotingClientTest`, `NettyServerConfigTest`, `NettyClientConfigTest` —
     20 tests, 0 failures
   - `mvn -B -ntp -pl remoting package` with checkstyle + spotbugs enabled: `BUILD SUCCESS`, spotbugs `BugInstance size is 0`
   
   This change was prepared with AI assistance (analysis, patch and test drafting); the diff and every result above were
   reproduced locally by running the module's tests against the base commit and the patched tree.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #11396] fix(remoting): apply serverSocketBacklog to the accept backlog [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11397:
URL: https://github.com/apache/rocketmq/pull/11397#issuecomment-6183847261

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/11397?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 49.73%. Comparing base ([`9ea2ccd`](https://app.codecov.io/gh/apache/rocketmq/commit/9ea2ccdc2b41445aee5e177e14e501d606f5a1ed?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`34b1d6c`](https://app.codecov.io/gh/apache/rocketmq/commit/34b1d6ceb810e5e5fc82daec4a728563f497104d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 7 commits behind head on develop.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop   #11397      +/-   ##
   =============================================
   - Coverage      49.75%   49.73%   -0.03%     
   - Complexity     14354    14356       +2     
   =============================================
     Files           1390     1390              
     Lines         103246   103262      +16     
     Branches       13502    13503       +1     
   =============================================
   - Hits           51375    51362      -13     
   - Misses         45679    45702      +23     
   - Partials        6192     6198       +6     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/11397?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org