Affects: \
Below is the code :
final ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setNameFormat("XXX_THREAD")
.setDaemon(true)
.build();
// Intentionally 1 thread
ScheduledThreadPoolExecutor scheduledExecutor = new ScheduledThreadPoolExecutor(1, threadFactory);
scheduledExecutor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
scheduledExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
scheduledExecutor.setRemoveOnCancelPolicy(true);
scheduledExecutor.setRejectedExecutionHandler(new DiscardPolicy());
return scheduledExecutor;
scheduledExecutor.scheduleWithFixedDelay(this::runUpdateJob, 1, 1, TimeUnit.SECONDS);
The moment we change the system time to past (say 1 hour before current time), it starts affecting CPU resources(around 95%). The similar thing could happen during Daylight Saving also where time shifts to 1 hour past. Although, its gets normal when the past time elapsed.
Using JDK 1.8.0_202
Comment From: snicoll
@Shikari0744 trying to get my head around what could go wrong. If you want support, please take the time to build a small sample that reproduces the problem with instructions on how to trigger it. You can attach the sample as a zip here or push the code to a separate GitHub repository.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.