lizining1231 opened a new pull request, #3590: URL: https://github.com/apache/dubbo-go/pull/3590
### Description Fixes #3570 `RegisterService` previously published the full app metadata inside the per-URL loop, writing an identical payload N times for N exported services. This caused startup write amplification and extra pressure on the metadata center. This PR moves `PublishAppMetadata` out of the loop so the metadata center is written exactly once after all instances are registered. The revision is identical across iterations, so publishing once is sufficient. A new test `TestServiceDiscoveryRegistryRegisterPublishesMetadataOnce` registers two services and asserts that app metadata is published exactly once. The test fails on the previous per-URL publish implementation. ### 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]
