Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymongo/asynchronous/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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

_debug_log(
_SDAM_LOGGER,
topologyId=self._topology_id,
Expand Down
2 changes: 1 addition & 1 deletion pymongo/synchronous/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ 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:
_debug_log(
_SDAM_LOGGER,
topologyId=self._topology_id,
Expand Down
Loading