SuperCarrys opened a new issue, #2229:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2229
After reading the source code of the job, I have a question, why not set the
ip child node under the servers node as a temporary node, but save it
permanently, so that with the release of services in k8s, there will be more
and more ip child nodes , and these ip nodes will be traversed when judging the
job status, which will cause problems as the number increases.
I think it is feasible to set the node under servers as a temporary node.
After the release, the old ip is useless, and it doesn't matter if it is
deleted. I will do a test locally.
Regarding this point, I may have some inconsiderations, and I hope the
official can see if it is feasible.
` /**
* 持久化作业服务器上线信息.
*
* @param enabled 作业是否启用
*/
public void persistOnline(final boolean enabled) {
if (!JobRegistry.getInstance().isShutdown(jobName)) {
//
jobNodeStorage.fillJobNode(serverNode.getServerNode(JobRegistry.getInstance().getJobInstance(jobName).getIp()),
enabled ? "" : ServerStatus.DISABLED.name());
//改为临时节点
jobNodeStorage.fillEphemeralJobNode(serverNode.getServerNode(JobRegistry.getInstance().getJobInstance(jobName).getIp()),
enabled ? "" : ServerStatus.DISABLED.name());
}
}
`
--
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]