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
enabled timeout when fetch read-side offset #1278
Conversation
@@ -38,6 +38,9 @@ db.default { | |||
|
|||
# 5 * number of threads | |||
maxConnections = 100 | |||
|
|||
# if true, a Mbean for AsyncExecutor will be registered | |||
registerMbeans = false |
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.
Decide to add it to this PR. This can be useful when debugging slick.
AsyncExecutor
provides this option, but we were not using it.
} | ||
scaladsl.Source | ||
.fromFuture(futureOffset) | ||
.initialTimeout(config.offsetTimeout) |
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.
If futureOffset
never completes (because of any underlying bug) that Source
will never start and therefore the RestartSource
wrapping it will never restart.
The call to initialTimeout
make sure that the Source
fails if a first element (the offset) is not pushed throught it within the passed offsetTimeout
(defaults to 5s)
There seems to be a compile issue. |
* enabled timeout when fetch read-side offset * fixing test compilation
Backported |
Make sure that read-side processors don't keep waiting forever when fetching offset.