tianping526 opened a new issue, #1014: URL: https://github.com/apache/rocketmq-clients/issues/1014
### Before Creating the Bug Report - [x] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions). - [x] I have searched the [GitHub Issues](https://github.com/apache/rocketmq-clients/issues) and [GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions) of this repository and believe that this is not a duplicate. - [x] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Programming Language of the Client Go ### Runtime Platform Environment Image: ubuntu-24.04 Version: 20250602.3.0 ### RocketMQ Version of the Client/Server github.com/apache/rocketmq-clients/golang/v5 v5.1.2 ### Run or Compiler Version go 1.24.1 ### Describe the Bug ``` WARNING: DATA RACE Read at 0x00c000554c50 by goroutine 18: github.com/apache/rocketmq-clients/golang/v5.(*defaultClientMeterProvider).isEnabled() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/metric.go:168 +0x2c ... Previous write at 0x00c000554c50 by goroutine 384: github.com/apache/rocketmq-clients/golang/v5.(*defaultClientMeterProvider).Reset() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/metric.go:185 +0xb2c ... WARNING: DATA RACE Read at 0x00c000aa1080 by goroutine 18: sync/atomic.LoadInt32() /usr/local/go/src/runtime/race_amd64.s:202 +0xb sync/atomic.LoadUint32() <autogenerated>:1 +0x10 github.com/apache/rocketmq-clients/golang/v5.(*defaultMessageMeterInterceptor).doAfter() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/metric.go:[156](https://github.com/tianping526/eventbridge/actions/runs/15580949474/job/43875855305#step:7:157) +0x62 ... Previous write at 0x00c000aa1080 by goroutine 384: github.com/apache/rocketmq-clients/golang/v5.init.func5() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/metric.go:100 +0x58 github.com/apache/rocketmq-clients/golang/v5.(*defaultClientMeterProvider).Reset() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/metric.go:185 +0xb17 ... WARNING: DATA RACE Read at 0x00c000143438 by goroutine 18: github.com/apache/rocketmq-clients/golang/v5.(*defaultProducer).takeMessageQueues() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/producer.go:82 +0xb1 github.com/apache/rocketmq-clients/golang/v5.(*defaultProducer).send0() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/producer.go:329 +0xa1b github.com/apache/rocketmq-clients/golang/v5.(*defaultProducer).getPublishingTopicRouteResult() /go/pkg/mod/github.com/apache/rocketmq-clients/golang/[email protected]/producer.go:92 +0xfc github.com/apache/rocketmq-clients/golang/v5.(*defaultProducer).send0() ... Previous write at 0x00c000143438 by goroutine 180: sync/atomic.StoreInt32() /usr/local/go/src/runtime/race_amd64.s:231 +0xb sync/atomic.StoreUint32() <autogenerated>:1 +0x14 internal/sync.(*HashTrieMap[go.shape.interface {},go.shape.interface {}]).initSlow() /usr/local/go/src/internal/sync/hashtriemap.go:55 +0x166 internal/sync.(*HashTrieMap[go.shape.interface {},go.shape.interface {}]).init() /usr/local/go/src/internal/sync/hashtriemap.go:32 +0x46 internal/sync.(*HashTrieMap[go.shape.interface {},go.shape.interface {}]).LoadAndDelete() /usr/local/go/src/internal/sync/hashtriemap.go:310 +0x64 sync.(*Map).LoadAndDelete() /usr/local/go/src/sync/hashtriemap.go:73 +0x44 github.com/apache/rocketmq-clients/golang/v5.(*defaultClient).doHeartbeat() ... ``` ### Steps to Reproduce go test -race ### What Did You Expect to See? No DATA RACE ### What Did You See Instead? DATA RACE ### Additional Context _No response_ -- 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]
