You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "DMwangnima (via GitHub)" <gi...@apache.org> on 2023/09/20 13:39:44 UTC
[GitHub] [dubbo-go] DMwangnima opened a new issue, #2430: goroutine scheduling issues in service offline scenarios
DMwangnima opened a new issue, #2430:
URL: https://github.com/apache/dubbo-go/issues/2430
### Environment
<!--
- Server: Dubbo-go, v3.0.5
- Client: Dubbo-go, v3.0.5
- Protocol: Triple
- Registry: Nacos, v2.0.0
-->
- Server: Dubbo-go, v3.0.1
- Client: Dubbo-go, v3.0.1
- Protocol: dubbo
- Registry: zookeeper
### Issue description
**Invoking Process:**
1. ZookeeperServiceDiscovery.DataChange =>
(1) GetInstances
Get the latest instance of this service. Because of the service not actually calling **UnRegister** (refer to graceful_shutdown) when the service shuts down, but waits for the ephemeral node to be removed by the zookeeper node, there is a probability of obtaining the offline instance.
(2) ServiceInstanceChangedListenerImpl.OnEvent
Callback. Returning instances to ServiceInstanceChangedListernerImpl.
2. ServiceInstanceChangedListenerImpl.OnEvent =>
(1) RegistryDirectory.NotifyAll
Callback. Returning urls of instances to RegistryDirectory
3. RegistryDirectory.NotifyAll
<img width="738" alt="image" src="https://github.com/apache/dubbo-go/assets/33331974/4f4e2d00-7367-47ff-9d0c-2e1b5aec0e35">
**refreshAllInvokers** is executed asynchronously, in which the assembly of the invoker is performed. In a large-scale offline scenario, the offline of each instance will trigger the entire process. **NotifyAll** is also called several times, and the order of calls between multiple **refreshAllInvokers** cannot be guaranteed. There may be calls to offline services.
This bug refers to https://github.com/apache/dubbo-go/issues/2328.
### Logs
<details><summary>Click me to check logs</summary>
```
Copy logs to here.
```
</details>
--
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: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] goroutine scheduling issues in service offline scenarios [dubbo-go]
Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj closed issue #2430: goroutine scheduling issues in service offline scenarios
URL: https://github.com/apache/dubbo-go/issues/2430
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org