Vanlightly commented on pull request #2911: URL: https://github.com/apache/bookkeeper/pull/2911#issuecomment-984455104
@1559924775 thanks for spotting this. However I think the proposed solution isn't quite right. I think there should be a cleaner solution without resorting to reflection. For example, one solution might be: 1. In doCheckpoint, don't submit it to the executor. Run it synchronously within the runnable. 2. Change the `scheduleAtFixedRate` to `schedule`. Inside doCheckpoint, submit the work again using `schedule`, calculating how long the delay should be based on how long it took the checkpoint to run. There is also `scheduledWithFixedDelay` which would be simpler, though would always put the same delay between executions, even if a checkpoint takes a very long time. -- 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]
