Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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
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/[email protected]/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
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.