Small fixes for reconnect policy and hearbeat#834
Open
Lorak-mmk wants to merge 3 commits intoscylladb:masterfrom
Open
Small fixes for reconnect policy and hearbeat#834Lorak-mmk wants to merge 3 commits intoscylladb:masterfrom
Lorak-mmk wants to merge 3 commits intoscylladb:masterfrom
Conversation
This was kept this way to preserve legacy behavior, but this behavior is absurd and hurtful. We need to get rid of it now.
This better conveys what this is: not a timeut duration from config, but how much of this timeout is left right now.
The timeout argument in `wait` tells how much we need to wait taking into consideration that we already waited for some other futures. This created confusing hearbeat messages, that could even show negative wait times.
dkropachev
reviewed
Apr 29, 2026
| """ | ||
|
|
||
| def __init__(self, delay, max_attempts=64): | ||
| def __init__(self, delay, max_attempts=None): |
Collaborator
There was a problem hiding this comment.
Could you elaborate in commit message why it is harmfull, what happens when max-attempts is reached ?
| raise self._exception | ||
| else: | ||
| raise OperationTimedOut("Connection heartbeat timeout after %s seconds" % (timeout,), | ||
| raise OperationTimedOut("Connection heartbeat timeout after %s seconds" % (original_timeout,), |
Collaborator
There was a problem hiding this comment.
Now i find this exception message very confusing, it says Connection heartbeat timeout after ${original_timeout} seconds, but it waited ${timeout},
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.
When looking into #295 and https://scylladb.atlassian.net/browse/SCYLLADB-1251 I found some minor issues that this PR fixes.
Connection heartbeat timeout after -56.143085956573486 seconds, last_host=127.0.16.3:19042. This is because they usedtimeoutargument passed towait, which is not the whole timeout duration, but the duration LEFT after waiting for other futures.Pre-review checklist
I have provided docstrings for the public items that I want to introduce.I have adjusted the documentation in./docs/source/.Fixes:annotations to PR description.