You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/12/02 09:38:16 UTC

[GitHub] [bookkeeper] Vanlightly commented on pull request #2911: Adjust checkpoint timing adaptively according to throughput

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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org