You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/01/06 11:44:18 UTC

[GitHub] [rocketmq] csdm001 opened a new issue #2561: There's a block of code that never use

csdm001 opened a new issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561


   in `org.apache.rocketmq.broker.BrokerStartup#createBrokerController ` method:
   
   final MessageStoreConfig messageStoreConfig = new MessageStoreConfig();
   if (BrokerRole.SLAVE == messageStoreConfig.getBrokerRole()) {
       int ratio = messageStoreConfig.getAccessMessageInMemoryMaxRatio() - 10;
       messageStoreConfig.setAccessMessageInMemoryMaxRatio(ratio);
   }
   
   I think that  the  if branch code is never executed
   
   
   


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] githublaohu commented on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
githublaohu commented on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758662001


   Yes, it should be on line 142
   是的,应该放到142行


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] csdm001 removed a comment on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
csdm001 removed a comment on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758509041


   > Some data sensitive businesses will use synchronization.Modify configuration to synchronize
   > 一些对数据比较敏感的业务,会使用同步。修改配置为同步
   
   MessageStoreConfig object is newly created and its property brokerRole default value is ASYNC_MASTER. The code in if will never be executed!
   
   messageStoreConfig 对象是创建的,默认值是ASYNC_MASTER ,感觉if里的代码永远得不到执行!


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] csdm001 commented on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
csdm001 commented on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758509528


   > Some data sensitive businesses will use synchronization.Modify configuration to synchronize
   > 一些对数据比较敏感的业务,会使用同步。修改配置为同步
   
   MessageStoreConfig object is newly created and its property brokerRole default value is ASYNC_MASTER. The code in if will never be executed!
   
   messageStoreConfig 对象是刚刚创建的,默认值是ASYNC_MASTER ,感觉if里的代码永远得不到执行!


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] csdm001 commented on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
csdm001 commented on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758508830


   > Some data sensitive businesses will use synchronization.Modify configuration to synchronize
   > 一些对数据比较敏感的业务,会使用同步。修改配置为同步
   MessageStoreConfig object is newly created and its property brokerRole default value is  ASYNC_MASTER. The code in if will never be executed! 
   
   messageStoreConfig 对象是创建的,默认值是ASYNC_MASTER ,感觉if里的代码永远得不到执行! 


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] csdm001 commented on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
csdm001 commented on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758509041


   > Some data sensitive businesses will use synchronization.Modify configuration to synchronize
   > 一些对数据比较敏感的业务,会使用同步。修改配置为同步
   
   MessageStoreConfig object is newly created and its property brokerRole default value is ASYNC_MASTER. The code in if will never be executed!
   
   messageStoreConfig 对象是创建的,默认值是ASYNC_MASTER ,感觉if里的代码永远得不到执行!


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] csdm001 removed a comment on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
csdm001 removed a comment on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758508830


   > Some data sensitive businesses will use synchronization.Modify configuration to synchronize
   > 一些对数据比较敏感的业务,会使用同步。修改配置为同步
   MessageStoreConfig object is newly created and its property brokerRole default value is  ASYNC_MASTER. The code in if will never be executed! 
   
   messageStoreConfig 对象是创建的,默认值是ASYNC_MASTER ,感觉if里的代码永远得不到执行! 


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq] githublaohu commented on issue #2561: There's a block of code that never use

Posted by GitBox <gi...@apache.org>.
githublaohu commented on issue #2561:
URL: https://github.com/apache/rocketmq/issues/2561#issuecomment-758490976


   Some data sensitive businesses will use synchronization.Modify configuration to synchronize
   一些对数据比较敏感的业务,会使用同步。修改配置为同步


----------------------------------------------------------------
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.

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