dubbo 当服务重启后ServiceInstancesChangedListener一直在重试

fbcarpbf  于 4个月前  发布在  其他
关注(0)|答案(3)|浏览(85)

dubbo/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java

Line 171 in 7a33ddf

| | retryFuture = scheduler.schedule(newAddressRefreshRetryTask(retryPermission, event.getServiceName()), 10_000L, TimeUnit.MILLISECONDS); |

provider重启后,consumer一直在这个方法重试
171行提交延迟10s的AddressRefreshRetryTask到线程池
10s后会走到523行ServiceInstancesChangedListener.this.onEvent(retryEvent);
如果还是连不上,就又走到171行

但是服务已经被重启,这里一直在重试旧的实例,就进入死循环了

v9tzhpje

v9tzhpje1#

Is there a detailed procedure for reproduction?

bd1hkmkf

bd1hkmkf3#

dubbo/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java

Line 171 in 7a33ddf

| | retryFuture = scheduler.schedule(newAddressRefreshRetryTask(retryPermission, event.getServiceName()), 10_000L, TimeUnit.MILLISECONDS); |

provider重启后,consumer一直在这个方法重试 171行提交延迟10s的AddressRefreshRetryTask到线程池 10s后会走到523行ServiceInstancesChangedListener.this.onEvent(retryEvent); 如果还是连不上,就又走到171行

但是服务已经被重启,这里一直在重试旧的实例,就进入死循环了

你好,描述中提到"重试旧的实例",是旧实例一直都存在于容器没被剔除吗?

相关问题