anrror opened a new pull request, #1100: URL: https://github.com/apache/rocketmq-client-go/pull/1100
…e sync.Map ## What is the purpose of the change Map will fail during concurrency。 When using ‘go’ (code:/vebchmark/nessage.go:225 go func... ). the map must add lock or replace with sync.Map It has length usage, so I can't use the sync.Map bug: goroutine 841 [running]: runtime.throw({0x2235be1?, 0xc000bac480?}) /usr/local/go/src/runtime/panic.go:992 +0x71 fp=0xc001a9b868 sp=0xc001a9b838 pc=0x438731 runtime.mapassign_faststr(0xc000518d40?, 0x1dc5040?, {0xc000c18b10, 0x16}) /usr/local/go/src/runtime/map_faststr.go:212 +0x39c fp=0xc001a9b8d0 sp=0xc001a9b868 pc=0x4135fc github.com/apache/rocketmq-client-go/v2/consumer.(*pushConsumer).Subscribe(0xc000281740, {0xc000c18b10?, 0x4?}, {{0x0?, 0x40d645?}, {0x0?, 0x4?}}, 0xc0005a2320) /home/app/go/pkg/mod/github.com/apache/rocketmq-client-go/v2@v2.1.2/consumer/push_consumer.go:305 +0x1fb fp=0xc001a9b960 sp=0xc001a9b8d0 pc=0x82ab5b ## Brief changelog Map's concurrency issues ## Verifying this change XXXX Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`. - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists. - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas). -- 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-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org