RaigorJiang commented on PR #2555: URL: https://github.com/apache/shardingsphere-elasticjob/pull/2555#issuecomment-6432208797
Hi @linghengqian One potential follow-up improvement to confirm: since `ScheduleJobBootstrapStartupRunner` now implements `SmartLifecycle`, its `stop()` method is invoked for a regular `ApplicationContext.stop()` as well as during context closure. It currently calls `ScheduleJobBootstrap.shutdown()`, which permanently shuts down the Quartz scheduler and cleans up the associated resources. If the same context is subsequently started again, `start()` only sets `running = true`, so the scheduled jobs remain shut down while the runner reports that it is running. Spring’s [Lifecycle contract](https://github.com/spring-projects/spring-framework/blob/v5.3.39/spring-context/src/main/java/org/springframework/context/Lifecycle.java#L24-L29) includes runtime stop/restart scenarios, whereas the new test covers final context closure. Could you assess whether this path needs a follow-up fix—for example, restricting permanent cleanup to actual context closure or ensuring that jobs can resume after a stop/sta rt cycle—and a corresponding regression test? -- 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]
