-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-4701 - Topology logging should use suppress_event #1826
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
Conversation
pymongo/asynchronous/topology.py
Outdated
@@ -497,7 +497,7 @@ async def _process_change( | |||
(td_old, self._description, self._topology_id), | |||
) | |||
) | |||
if _SDAM_LOGGER.isEnabledFor(logging.DEBUG): | |||
if _SDAM_LOGGER.isEnabledFor(logging.DEBUG) and sd_old != server_description: |
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.
Should this be and not suppress_event
?
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.
suppress_event
checks for event publishing flags, which we don't use for logging.
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.
Could that be changed?
suppress_event = sd_old == server_description
Also could you add some more info to the failing assert message? |
To which message? |
The one in this ticket:
|
Could you update the PR title and Jira ticket to describe the bug fix instead of the test failure name? |
No description provided.