Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

旧服务下线的一段时间内,还是有任务会执行到这个机器节点上,有没有什么办法在新服务(和旧服务ip不通)上线的时候直接剔除旧的节点呢 #3442

Closed
LiJun990105 opened this issue Apr 30, 2024 · 1 comment

Comments

@LiJun990105
Copy link

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

Expected behavior

Actual behavior

Steps to reproduce the behavior

Other information

@lushimin
Copy link

服务器下线时,如果正常执行spring 自带的destroy()方法,执行器会向xxljob admin 发送一个http请求,最终执行com.xxl.job.admin.core.thread.JobRegistryHelper#registryRemove方法,该方法会在registry表中把当前节点去掉,但是不会更新group表,而实际调度是根据group表中的address_list来选择pod。group表中的地址信息是30s更新一次。所以最快也要30s。如果destroy()方法没有执行,只能等xxljob admin 90s没有收到心跳,再去registry表中把当前节点去掉,再更新group表。建议1、com.xxl.job.admin.core.thread.JobRegistryHelper#registryRemove方法中同步更新group表。
2、如果多次因为网络调度失败,将当前节点排除。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants