Littleiii opened a new pull request, #1115:
URL: https://github.com/apache/rocketmq-client-go/pull/1115

   ## What is the purpose of the change
   fix data race
   
   Previous read at 0x00c00013bd08 by goroutine 129:
     
[github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).InvokeSync()](http://github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).InvokeSync())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:576](http://github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:576)
 +0x95
     
[github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).findConsumerList()](http://github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).findConsumerList())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:952](http://github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:952)
 +0x25b
     
[github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalance.func1()](http://github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalance.func1())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:393](http://github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:393)
 +0x164
     sync.(*Map).Range()
         /usr/local/Cellar/go/1.19/libexec/src/sync/map.go:354 +0x225
     
[github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalance()](http://github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalance())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:370](http://github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:370)
 +0x56
     
[github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalanceIfNotPaused()](http://github.com/apache/rocketmq-client-go/v2/consumer.(*defaultConsumer).doBalanceIfNotPaused())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:366](http://github.com/apache/rocketmq-client-go/[email protected]/consumer/consumer.go:366)
 +0x117
     
[github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).RebalanceIfNotPaused()](http://github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).RebalanceIfNotPaused())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/consumer/push_consumer.go:335](http://github.com/apache/rocketmq-client-go/[email protected]/consumer/push_consumer.go:335)
 +0x3d
     
[github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).RebalanceIfNotPaused.func1()](http://github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).RebalanceIfNotPaused.func1())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:879](http://github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:879)
 +0x48
     sync.(*Map).Range()
         /usr/local/Cellar/go/1.19/libexec/src/sync/map.go:354 +0x225
     
[github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).RebalanceIfNotPaused()](http://github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).RebalanceIfNotPaused())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:877](http://github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:877)
 +0x95
     
[github.com/apache/rocketmq-client-go/v2/internal.GetOrNewRocketMQClient.func1()](http://github.com/apache/rocketmq-client-go/v2/internal.GetOrNewRocketMQClient.func1())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:231](http://github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:231)
 +0x125
     
[github.com/apache/rocketmq-client-go/v2/internal/remote.(*remotingClient).processCMD.func2()](http://github.com/apache/rocketmq-client-go/v2/internal/remote.(*remotingClient).processCMD.func2())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/internal/remote/remote_client.go:244](http://github.com/apache/rocketmq-client-go/[email protected]/internal/remote/remote_client.go:244)
 +0x95
     
[github.com/apache/rocketmq-client-go/v2/primitive.WithRecover()](http://github.com/apache/rocketmq-client-go/v2/primitive.WithRecover())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/primitive/base.go:100](http://github.com/apache/rocketmq-client-go/[email protected]/primitive/base.go:100)
 +0x48
     
[github.com/apache/rocketmq-client-go/v2/internal/remote.(*remotingClient).processCMD.func4()](http://github.com/apache/rocketmq-client-go/v2/internal/remote.(*remotingClient).processCMD.func4())
         
/Users/xxx/go/pkg/mod/[github.com/apache/rocketmq-client-go/[email protected]/internal/remote/remote_client.go:243](http://github.com/apache/rocketmq-client-go/[email protected]/internal/remote/remote_client.go:243)
 +0x39
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to