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/07/20 06:41:47 UTC

[GitHub] [rocketmq] caigy commented on issue #3143: MQClientInstance has a risk of blocking during persistAllConsumerOffset()

caigy commented on issue #3143:
URL: https://github.com/apache/rocketmq/issues/3143#issuecomment-883127813


   There're 5 tasks in `org.apache.rocketmq.client.impl.factory.MQClientInstance#scheduledExecutorService` and they're executed in a 'sequential' way just as described in question. After reading related code, I found that those tasks would read and write some shared fields, including but not limited to:
   
   - `org.apache.rocketmq.client.impl.factory.MQClientInstance#brokerAddrTable`
   - `org.apache.rocketmq.client.impl.factory.MQClientInstance#topicRouteTable`
   - `persistAllConsumerOffset()` also calling `updateTopicRouteInfoFromNameServer()`
   - etc.
   
   More precise work should be spent on how to make them work concurrently in a safe and efficient way.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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