Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry InterruptedException. #150

Closed
martinmr opened this issue Jul 1, 2020 · 1 comment
Closed

Retry InterruptedException. #150

martinmr opened this issue Jul 1, 2020 · 1 comment
Labels
status/accepted We were able to reproduce the issue and accept to work on it

Comments

@martinmr
Copy link
Contributor

martinmr commented Jul 1, 2020

I am running the Jepsen tests and some of the tests are failing with this error:

ERROR [2020-07-01 22:11:46,650] ForkJoinPool.commonPool-worker-4 - io.dgraph.DgraphAsyncClient The doRequest got interrupted:
java.lang.InterruptedException: null
        at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:347) ~[na:1.8.0_222]
        at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[na:1.8.0_222]
        at io.dgraph.DgraphAsyncClient.lambda$runWithRetries$2(DgraphAsyncClient.java:180) ~[dgraph4j-2.0.2.jar:na]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[na:1.8.0_222]
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582) ~[na:1.8.0_222]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[na:1.8.0_222]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[na:1.8.0_222]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[na:1.8.0_222]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[na:1.8.0_222]

The relevant section in the code (in DgraphAsyncClient) is:

 try {
            return ctxCallable.call().get();
          } catch (InterruptedException e) {
            LOG.error("The " + operation + " got interrupted:", e);
            throw new RuntimeException(e);
          } catch (ExecutionException e) {
            if (ExceptionUtil.isJwtExpired(e.getCause())) {
              try {
                // retry the login

I think InterruptedException should cause the operation to be retried to make the Jepsen tests more resilient.

@martinmr martinmr added the status/accepted We were able to reproduce the issue and accept to work on it label Jul 1, 2020
@abhimanyusinghgaur
Copy link
Contributor

Closing this as Jepsen may be causing the interrupted exception, and we should not change the client behaviour for that as once interrupted, the client should just terminate as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/accepted We were able to reproduce the issue and accept to work on it
Development

No branches or pull requests

2 participants