AsperforMias opened a new pull request, #3850: URL: https://github.com/apache/dubbo-go/pull/3850
### Description Fixes #3848 With application-level discovery, a provider that restarts on the same address is skipped by the consumer's closing tombstone, and the consumer keeps failing with `No provider available`. The tombstone already lets a re-add through when its URL `timestamp` differs. With application-level discovery that never happens: the URL is rebuilt from `MetadataInfo` cached by revision, and the revision does not change across a restart, so the re-added URL carries the old export timestamp. Nacos does not push an empty instance list, so no delete event clears the tombstone either. Changes: - `DefaultServiceInstance.ToURLs` adds the instance's registration timestamp (the `timestamp` instance metadata written since #3807) to each service URL as `instance.timestamp`. The URL's `timestamp`, which warmup uses, is unchanged, and the invoker cache key does not include the new param. - The closing tombstone records `instance.timestamp`, and a re-add with a different value is treated as a genuine restart. The existing export timestamp check is kept for interface-level discovery. Verified with Nacos, two providers and one consumer (Triple): after both providers restart on the same ports, the consumer logs `instance ... restarted with a new timestamp, clearing closing tombstone` and calls succeed again within ~10s. Before this change every call failed for more than 3 minutes. The new directory test fails without the change. ### Checklist - [x] I confirm the target branch is `develop` - [x] I have run `make fmt` to format my code - [x] I have run `make test` to run local tests (all packages pass except `TestDubboProtocol_Refer` and `TestDubboProtocolReferNoConnect` in `protocol/dubbo`, which also fail on the base commit locally because port 20000 is taken by another process on my machine) - [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]
