-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add connection_timeout_ms and reset the timeout counter more often #2388
Open
petterroea
wants to merge
36
commits into
dpkp:master
Choose a base branch
from
petterroea:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
85f91c6
Add connection_timeout_ms and reset the timeout counter more often
petterroea 0d6d70e
Refactor last_attempt -> last_activity
petterroea 015268d
Make tests work again
petterroea 6876f68
Add unit tests of new BrokerConnection functionality
petterroea 91581ed
Re-introduce last_attempt to avoid breakage
petterroea b95e46d
Rename project from kafka-python to kafka-python-ng (#1)
wbarnha 78c74c0
Fix artifact downloads for release
wbarnha e796019
Fix badge links in README.rst
wbarnha 38e159a
Reconfigure tests to complete in a more timely manner and skip some i…
wbarnha e762321
Test Kafka 0.8.2.2 using Python 3.10 in the meantime (#161)
wbarnha 00750aa
Remove support for EOL'ed versions of Python (#160)
wbarnha 5bd1323
Stop testing Python 3.13 in python-package.yml (#162)
wbarnha cda8f81
Avoid 100% CPU usage while socket is closed (#156)
wbarnha c02df08
Fix DescribeConfigsResponse_v1 config_source (#150)
wbarnha 65eacfb
Fix base class of DescribeClientQuotasResponse_v0 (#144)
wbarnha e0ebe5d
Update license_file to license_files (#131)
wbarnha 26bb3eb
Update some RST documentation syntax (#130)
wbarnha 2e6649c
Merge branch 'master' into master
wbarnha 88763da
Fix crc32c's __main__ for Python 3 (#142)
wbarnha b1a4c53
Strip trailing dot off hostname. (#133)
wbarnha 18eaa2d
Handle OSError to properly recycle SSL connection, fix infinite loop …
wbarnha 54cbd63
client_async: Allow throwing an exception upon socket error during (#…
wbarnha eb6fd9b
Log connection errors at ERROR level (#139)
wbarnha 6ad79a4
Support custom SASL mechanisms including AWS MSK (#170)
wbarnha deeccfa
Update python-package.yml to have 15m as timeout
wbarnha fcca556
Run pyupgrade on everything. (#171)
wbarnha a856dc4
Remove all vendoring (#169)
s-t-e-v-e-n-k 2f2ccb1
Support Describe log dirs (#145)
wbarnha 0259502
Update conftest.py to use request.node.originalname instead for legal…
wbarnha 3c124b2
KIP-345 Static membership implementation (#137)
wbarnha 56065da
Use monkeytype to create some semblance of typing (#173)
wbarnha cbf317b
Add zstd support on legacy record and ensure no variable is referred …
wbarnha d34ad3c
Merge branch 'master' into master
wbarnha af1a5f0
Update __init__.py of SASL to catch ImportErrors in case botocore is …
wbarnha aba153f
Add botocore to extras in setup.py
wbarnha a9e30b0
Merge branch 'master' into master
wbarnha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
My only concern with removing the
last_attempt
attribute is breaking functionality for users who may depend on this value, for whatever reason. Any particular reason why we can't retain this and allowlast_activity
to coexist as a separate attribute?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.
Can you see this @petterroea?
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.
Yep!
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.
Okay, I agree, that's a valid concern.
I don't think renaming the variable back is a good idea, as it is now updated more often than before and cannot be used to indicate the same things.
I can reinstate
last_activity
and make it be updated in the same places as earlier. Only downside here is that it would be a variable that is never read internally in the library, making it excess, but it would avoid breaking compatibility. Are you okay with this solution?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.
Almost, let me make a small adjustment. There are some points where I'd like to update both values via
self.last_activity = self.last_attempt = time.time()
.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.
Ok for me!
Just remember that the value of keeping
self.last_activity
is diminishing if the variable isn't updated at the same places in time as before this PR. I don't know where you want to make the changes, so I can't really comment more on it, though.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.
@wbarnha Happy to resolve this conversation?