222twotwotwo opened a new pull request, #1132: URL: https://github.com/apache/incubator-seata-go/pull/1132
<!-- Thanks for sending a pull request! --> <!-- Please make sure you have read and understood the contributing guidelines --> - [ ] I have registered the PR [changes](https://github.com/apache/incubator-seata-go/tree/master/changes). **What this PR does**: This PR makes unimplemented registry types fail fast during registry initialization. Previously, configuring `nacos`, `eureka`, `redis`, `zk`, `consul`, or `sofa` would leave the registry service instance as `nil`. The actual failure would only appear later as a nil-pointer panic when calling `Lookup`, which hides the real configuration problem. Now these registry types reuse the existing initialization error path and panic with a clear message: ```text init service registry err:registry type <type> is not implemented yet ``` **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes #1127 **Special notes for your reviewer**: This change only updates the registry initialization switch logic. The `InitRegistry` function signature and existing error handling behavior are unchanged. **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note Unsupported registry types now fail fast during registry initialization with a clear "not implemented yet" error instead of causing a later nil-pointer panic. ``` -- 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]
