Skip to content

Conversation

ShaneHarvey
Copy link
Member

@ShaneHarvey ShaneHarvey commented Oct 14, 2024

PYTHON-4579 Stop gossiping $clusterTime on SDAM connections

await self._topology.receive_cluster_time(details.get("$clusterTime"))
raise
return await self._check_once()
except asyncio.CancelledError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this extra except? We only catch Exception instead of BaseException below, so CancelledError should be thrown uncaught.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this was a merge conflict artifact. I'll remove.

self._description = new_td
await self._update_servers()
self._receive_cluster_time_no_lock(server_description.cluster_time)
# TODO: Verify that app errors update the $clusterTime.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still TODO?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in https://jira.mongodb.org/browse/DRIVERS-3118. I'll remove this TODO.

@ShaneHarvey
Copy link
Member Author

Ready for another look.

# Initiate streaming hello (MongoDB 4.4+).
response = await conn._hello(
cluster_time,
None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove cluster_time as a parameter to _hello entirely now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done.

Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ShaneHarvey ShaneHarvey merged commit 85ca6f1 into mongodb:master Feb 26, 2025
32 of 33 checks passed
sleepyStick added a commit to sleepyStick/mongo-python-driver that referenced this pull request Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants