wyf027 opened a new pull request, #3495:
URL: https://github.com/apache/dubbo-go/pull/3495

   ## Summary
   
   - synchronize Apollo listener membership and callback snapshots
   - attach the first configuration listener before registering with the Apollo 
client
   - remove empty listener groups so a later add performs a fresh registration
   - keep Apollo SDK calls outside the local lifecycle lock and compensate 
synchronous reentrant removals
   
   ## Root cause
   
   The listener map was read, written, and iterated concurrently without 
synchronization. The last listener removal also left the empty group in the 
configuration map, so adding a listener again reused an unregistered group. 
Registering the Apollo callback before adding the first configuration listener 
could additionally miss a synchronous initial change.
   
   ## Validation
   
   - `go test ./config_center/apollo -run 'TestApollo(Listener|Configuration)' 
-count=20`
   - `go test -race ./config_center/apollo -run '^(TestApollo.*|TestListener)$' 
-count=10`
   - `go test ./config_center/... -count=1`
   - `go vet ./config_center/...`
   - `golangci-lint run ./config_center/apollo`
   - `make check-fmt`
   - `make test`
   
   Part of #3248.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to