[fix][txn] Catch and log runtime exceptions in async operations#19258
Merged
nicoloboschi merged 3 commits intoapache:masterfrom Jan 18, 2023
Merged
[fix][txn] Catch and log runtime exceptions in async operations#19258nicoloboschi merged 3 commits intoapache:masterfrom
nicoloboschi merged 3 commits intoapache:masterfrom
Conversation
eolivelli
reviewed
Jan 17, 2023
lhotari
approved these changes
Jan 17, 2023
Contributor
Author
|
/pulsarbot rerun-failure-checks |
Codecov Report
@@ Coverage Diff @@
## master #19258 +/- ##
============================================
+ Coverage 46.37% 49.39% +3.01%
- Complexity 18221 19243 +1022
============================================
Files 1599 1609 +10
Lines 130054 126294 -3760
Branches 14317 13728 -589
============================================
+ Hits 60310 62378 +2068
+ Misses 63630 57387 -6243
- Partials 6114 6529 +415
Flags with carried forward coverage won't be shown. Click here to find out more.
|
liangyepianzhou
pushed a commit
that referenced
this pull request
Feb 7, 2023
(cherry picked from commit cfd7e60)
nicoloboschi
added a commit
to datastax/pulsar
that referenced
this pull request
Feb 28, 2023
This comment was marked as resolved.
This comment was marked as resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
In the transaction coordinator code, most of the async execution doesn't properly runtime exceptions that might happens.
The exception is not logged and the
CompletableFutureis not completed.Similar changes in past #17484
Modifications
FutureUtil#safeRunAsync(Runnable runnable, Executor executor, CompletableFuture completableFuture)that completes exceptionally the completablefuture if an error has been caught in the runnableVerifying this change
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: