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

Unwrap CompletionException to check actual thrown exception #463

Merged
merged 3 commits into from
Nov 29, 2019

Conversation

imasahiro
Copy link
Member

Motivation:

  • An exception which is thrown at CompletableFuture callback handler will be wrapped with CompletionException.
  • ReplicationLagTolerantCentralDogma does not retry when CompletionException-wrapped RevisionNotFoundException is thrown

Changes:

  • Unwrap CompletionException

Results:

  • Handle replication lag correctly

Motivation:
- An exception which is thrown at CompletableFuture callback handler will be wrapped with CompletionException.
- ReplicationLagTolerantCentralDogma does not retry when CompletionException-wrapped RevisionNotFoundException is thrown

Changes:
- Unwrap CompletionException

Results:
- Handle replication lag correctly
@ikhoon ikhoon added the defect label Nov 28, 2019
@ikhoon ikhoon added this to the 0.43.4 milestone Nov 28, 2019
@ikhoon
Copy link
Contributor

ikhoon commented Nov 28, 2019

Build error with Checkstyle 😉

> Task :client:java:checkstyleTest FAILED
[ant:checkstyle] [ERROR] /home/travis/build/line/centraldogma/client/java/src/test/java/com/linecorp/centraldogma/internal/client/ReplicationLagTolerantCentralDogmaTest.java:33:8: Unused import - java.util.concurrent.CountDownLatch. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/line/centraldogma/client/java/src/test/java/com/linecorp/centraldogma/internal/client/ReplicationLagTolerantCentralDogmaTest.java:34:8: Unused import - java.util.concurrent.ExecutorService. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/line/centraldogma/client/java/src/test/java/com/linecorp/centraldogma/internal/client/ReplicationLagTolerantCentralDogmaTest.java:37:8: Unused import - java.util.concurrent.TimeUnit. [UnusedImports]

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks!

@codecov
Copy link

codecov bot commented Nov 28, 2019

Codecov Report

Merging #463 into master will increase coverage by 0.06%.
The diff coverage is 87.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #463      +/-   ##
============================================
+ Coverage     69.87%   69.93%   +0.06%     
- Complexity     3108     3114       +6     
============================================
  Files           322      322              
  Lines         12569    12575       +6     
  Branches       1346     1347       +1     
============================================
+ Hits           8782     8794      +12     
+ Misses         2941     2937       -4     
+ Partials        846      844       -2
Impacted Files Coverage Δ Complexity Δ
...nal/client/ReplicationLagTolerantCentralDogma.java 87.55% <87.5%> (+1.54%) 85 <3> (+6) ⬆️
...ogma/client/armeria/CentralDogmaEndpointGroup.java 58.33% <0%> (-8.34%) 5% <0%> (-1%)
.../centraldogma/internal/client/AbstractWatcher.java 64.92% <0%> (-3.74%) 27% <0%> (-4%)
...internal/replication/ZooKeeperCommandExecutor.java 78.72% <0%> (+0.48%) 60% <0%> (ø) ⬇️
...com/linecorp/centraldogma/server/CentralDogma.java 75.55% <0%> (+0.48%) 47% <0%> (+1%) ⬆️
...r/internal/admin/auth/FileBasedSessionManager.java 77.69% <0%> (+1.43%) 25% <0%> (+1%) ⬆️
...corp/centraldogma/client/AbstractCentralDogma.java 55.17% <0%> (+3.44%) 12% <0%> (+1%) ⬆️
...com/linecorp/centraldogma/client/CentralDogma.java 55.55% <0%> (+11.11%) 8% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5e6956...c082527. Read the comment docs.

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, @imasahiro !

@trustin trustin merged commit 65a937e into line:master Nov 29, 2019
@imasahiro imasahiro deleted the lag branch November 29, 2019 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants