wyf027 opened a new pull request, #3493: URL: https://github.com/apache/dubbo-go/pull/3493
Fixes #3248 ## Summary - protect the REST consumer and provider service-config maps with independent RWMutexes - shallow-clone setter inputs before atomic publication so later caller map mutations cannot change registered membership - read single entries under the corresponding read lock and return structural snapshots from whole-map getters - preserve nil-map behavior and existing RestServiceConfig pointer identity - add input/output isolation, replacement, nil, and concurrent access coverage for both maps ## Scope This PR addresses structural map ownership and concurrency for the REST configuration registries. It intentionally does not deep-clone the pointed RestServiceConfig values or claim deep object immutability. ## Testing - `go test ./protocol/rest/config/... -count=20` - `go test -race ./protocol/rest/config/... -count=10` - `go test ./protocol/rest/... -count=1` - `go vet ./protocol/rest/config/...` - `golangci-lint run ./protocol/rest/config/... --timeout=10m` - `make check-fmt` - `make test` ## Checklist - [x] Target branch is `develop` - [x] New behavior is covered by tests - [x] Formatting, lint, race, and full test suites pass locally - [x] Commit includes a Signed-off-by trailer -- 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]
