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

Additional error checks in TwoPhasesCompactor #9133

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented Jan 5, 2021

Motivation

If there is an exception in the whenComplete() block, the exception is "eaten" up and the loopPromise is never set to failed.

Instead, it's better to use the thenAccept().exceptionally() to ensure that any exception in the first handler will be propagated back.

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Jan 5, 2021
@merlimat merlimat added this to the 2.8.0 milestone Jan 5, 2021
@merlimat merlimat self-assigned this Jan 5, 2021
@sijie sijie merged commit 984bf83 into apache:master Jan 6, 2021
@merlimat merlimat deleted the fix-compaction-error-handling branch January 6, 2021 06:55
codelipenghui pushed a commit that referenced this pull request Jan 7, 2021
If there is an exception in the `whenComplete()` block, the exception is "eaten" up and the `loopPromise` is never set to failed.

Instead, it's better to use the `thenAccept().exceptionally()` to ensure that any exception in the first handler will be propagated back.

(cherry picked from commit 984bf83)
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.1 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants