-
Notifications
You must be signed in to change notification settings - Fork 571
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
fix(logstreams): complete future when any error during opening an appender #8038
Conversation
…ender Not all exceptions occuring during opening an appender was handled properly. In such cases the caller (StreamProcessor) waiting for the writer will wait for ever because the future is not completed. This commit adds a catch all exception to the openAppender which completes the futuer exceptionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @deepthidevaki could we please add a test for this? Or do you see any blockers for it?
logstreams/src/main/java/io/camunda/zeebe/logstreams/impl/log/LogStreamImpl.java
Show resolved
Hide resolved
logstreams/src/main/java/io/camunda/zeebe/logstreams/impl/log/LogStreamImpl.java
Show resolved
Hide resolved
@Zelldon I have added test for the case when there is an exception when trying to read the last position. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @deepthidevaki just a small question on your test but in general LGTM
@Before | ||
public void setup() { | ||
logStream = | ||
SyncLogStream.builder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we use the Sync if you in the test anyway use the async one? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async LogStreamBuilder
can only be called from an actor, because it uses ActorFuture::onComplete
. To handle that I have to add a wrapper code around it, which is already done in SyncLogStreamBuilder.
951c775
to
90e8ee2
Compare
90e8ee2
to
c649178
Compare
bors r+ |
Build succeeded: |
Backport failed for Please cherry-pick the changes locally. |
Backport failed for Please cherry-pick the changes locally. |
@deepthidevaki I've fixed the bug above. Let's try to backport again, once #8084 is merged. |
Thanks @korthout |
@deepthidevaki should be possible again now. Feel free to try it out |
/backport |
Successfully created backport PR #8086 for |
Successfully created backport PR #8087 for |
Description
Not all exceptions occuring during opening an appender was handled properly. In such cases the caller (StreamProcessor) waiting for the writer will wait for ever because the future is not completed. This commit adds a catch all exception to the openAppender which completes the future exceptionally.
Related issues
Related #7992
closes #
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/0.25
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation: