sandynz opened a new issue #12449:
URL: https://github.com/apache/shardingsphere/issues/12449
## Bug Report
### Which version of ShardingSphere did you use?
5.0.0-RC1-SNAPSHOT
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Scaling, commit: 46aeeff1b2e837fe514df3097e4945057b911e7a
### Expected behavior
Job could be stopped when exception occur.
### Actual behavior
It need to stop job manually, else it couldn't be started again.
### Reason analyze (If you can)
In `ScalingJobExecutor.java`
```
private void execute(final JobConfigurationPOJO jobConfigPOJO) {
if (EXECUTING_JOBS.add(jobConfigPOJO.getJobName())) {
new OneOffJobBootstrap(ScalingAPIFactory.getRegistryCenter(),
new ScalingJob(), jobConfigPOJO.toJobConfiguration()).execute();
}
}
```
job name is still cached in `EXECUTING_JOBS`, since job is not stopped
automatically.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Submit wrong srouce/target parameter in HTTP api `/scaling/job/start`.
### Example codes for reproduce this issue (such as a github link).
--
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]