-
Notifications
You must be signed in to change notification settings - Fork 168
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
Rework idle heartbeat for pull consumers #1046
Conversation
c4d83ea
to
851654b
Compare
851654b
to
ff5a74f
Compare
trace!("setting hearbeats"); | ||
let timeout = self.batch_config.idle_heartbeat.saturating_mul(2); | ||
self.heartbeat_timeout.get_or_insert_with(|| { | ||
Box::pin(tokio::time::timeout(timeout, futures::future::pending())) |
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.
This could have been done with Sleep
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.
oh, right. I took it over from different approach I had before. Nice nit. Thx.
Signed-off-by: Tomasz Pietrek <[email protected]> --amend Signed-off-by: Tomasz Pietrek <[email protected]>
ff5a74f
to
685337b
Compare
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.
tiny nit, lgtm.
terminated: bool, | ||
heartbeat_timeout: Option<Pin<Box<tokio::time::Sleep>>>, |
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.
nit: heartbeat_sleep
Signed-off-by: Tomasz Pietrek [email protected]