xxs588 opened a new pull request, #3269: URL: https://github.com/apache/dubbo-go/pull/3269
### Description Fixes #3247 This PR follows the concurrency-safety direction from #3248 and #3249, and focuses on remaining race-prone shared states without introducing directory-level reorganization. Changes included: - `registry/directory`: guard `cacheInvokers`, `configurators`, and `SubscribedUrl` access with locks/snapshots - `registry/protocol`: synchronize `overrideSubscribeListener.configurator` read/write - `filter/hystrix`: snapshot regex cache under lock before callback execution - `metrics`: protect application info globals via `sync.RWMutex` Atomic commits: 1. `fix(directory): guard registry directory concurrent state access` 2. `fix(registry/protocol): synchronize override listener configurator` 3. `fix(filter/hystrix): avoid race when reading regex cache` 4. `fix(metrics): guard app info global state with RWMutex` Key local verification: - `make lint` - `go test -race ./registry/directory -run 'TestRegistryDirectory(IsAvailableConcurrentWithCacheUpdates|ConfiguratorConcurrentAccess|SubscribedURLConcurrentAccess)$'` - `go test -race ./registry/protocol -run 'TestOverrideSubscribeListenerConfiguratorConcurrentAccess$'` - `go test -race ./filter/hystrix -run 'TestHystrixFilterConcurrentRegexAccess$'` - `go test -race ./metrics -run 'TestAppInfoConcurrentAccess$'` ### Checklist - [x] I confirm the target branch is `develop` - [x] Code has passed local testing - [x] I have added tests that prove my fix is effective or that my feature works -- 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]
