lhotari commented on PR #24596: URL: https://github.com/apache/pulsar/pull/24596#issuecomment-3153720843
> `scheduleWithFixedDelay` might be able to avoid queuing scheduled tasks in extreme cases, but from all existing info I can see, it does not solve an actual issue. @BewareMyPower I agree that it doesn't fix the actual issue. That's why I'd recommend using `scheduleAtFixedRate` with the wrapper that optionally logs a warning when the previous execution is still running. In that case, it could be caused by a deadlock, for example. Logging would help in investigating and fixing the root cause. It would also be possible to track the thread that is in execution and log the stack trace of the thread that is stuck in executing the task. Without preventing concurrent job execution, the problem would get worse since another task would start executing the same task concurrently. That could already happen in cases where we have very short delays and lets say use synchronization to run the task one-by-one. All later coming tasks would get back logged in the executor which is a problem that should be solved. I have understood that it's the problem that @poorbarcode would like to address. -- 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]
