dubbo 使用 QOS 下线服务会偶现 InstancesChangeEvent callback exception
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
这是具体报错的堆栈信息,这种错误有没有办法避免
2022-10-10 17:28:42.890 [RID:] [traceId:] [nacos.publisher-com.alibaba.nacos.client.naming.event.InstancesChangeEvent] ERROR c.a.nacos.common.notify.NotifyCenter [DefaultPublisher.java:210] Event callback exception:
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@3bb61a6e rejected from java.util.concurrent.ScheduledThreadPoolExecutor@52260039[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 31]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)
at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533)
at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:632)
at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:678)
at org.apache.dubbo.registry.RegistryNotifier.notify(RegistryNotifier.java:77)
at org.apache.dubbo.registry.nacos.NacosRegistry$RegistryChildListenerImpl.onEvent(NacosRegistry.java:715)
at com.alibaba.nacos.client.naming.event.InstancesChangeNotifier.onEvent(InstancesChangeNotifier.java:124)
at com.alibaba.nacos.client.naming.event.InstancesChangeNotifier.onEvent(InstancesChangeNotifier.java:40)
at com.alibaba.nacos.common.notify.DefaultPublisher.lambda$notifySubscriber$0(DefaultPublisher.java:201)
at com.alibaba.nacos.common.notify.DefaultPublisher.notifySubscriber(DefaultPublisher.java:208)
at com.alibaba.nacos.common.notify.DefaultPublisher.receiveEvent(DefaultPublisher.java:192)
at com.alibaba.nacos.common.notify.DefaultPublisher.openEventHandler(DefaultPublisher.java:118)
at com.alibaba.nacos.common.notify.DefaultPublisher.run(DefaultPublisher.java:95)
Contributor guide
Research direction
Start with RegistryNotifier.notify at org.apache.dubbo.registry.RegistryNotifier.java:77 and the NacosRegistry.RegistryChildListenerImpl.onEvent path at NacosRegistry.java:715. Reproduce service shutdown through QOS while reviewing the executor lifecycle shown in the stack trace. Done means service removal no longer produces an InstancesChangeEvent callback exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100