incubator-pegasus icon indicating copy to clipboard operation
incubator-pegasus copied to clipboard

feat(java-client): Introduce retry mechanism into Java client

Open Samunroyu opened this issue 1 year ago • 3 comments

What problem does this PR solve?

Introduce retry mechanism into the Java client enhances user convenience and robustness.

The default retry policy will retry Integer.MAX_VALUE times, and default retry delay time is 20 ms. The exponentialBackoff retry policy will set by user self.

Tests
  • Unit test, for DefaultRetryPolicy and ExponentialBackoffRetryPolicy
Code changes
  • Has exported class clientoption.java: add retry parameter in clientoption
  • Add class retryPolicy: an interface for retry mechanism.
  • Add class DefaultRetryPolicy.java: implement default retry policy
  • Add class ExponentialBackoffRetryPolicy.java: allows use-defined retry mechanism .

Samunroyu avatar Jan 02 '24 09:01 Samunroyu

Some suggestions to improve the commit message: https://cbea.ms/git-commit/ https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/

acelyc111 avatar Jan 03 '24 12:01 acelyc111

I tried rerun the failed job but it still failed...

Apache9 avatar Jan 20 '24 02:01 Apache9

I tried rerun the failed job but it still failed...

the failed job is failed at start pegasus cluster. not java client unit test. Rerun one more time the job successful.

Samunroyu avatar Jan 23 '24 05:01 Samunroyu