Skip to content

Commit

Permalink
Reorder events
Browse files Browse the repository at this point in the history
  • Loading branch information
W-A-James committed Jan 10, 2024
1 parent 1072e22 commit 6b93f0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Events that MUST be published (with their conditions) are as follows.
* - ``TopologyClosedEvent``
- When a topology is shut down - this MUST be the last SDAM event fired.
* - ``ServerHeartbeatStartedEvent``
- Published when the server monitor sends its ``hello`` or legacy hello call to the server. When the monitor is creating a new connection, this event MUST be published just after the socket is created and just before the ``hello`` or legacy hello.
- Published when the server monitor sends its ``hello`` or legacy hello call to the server. When the monitor is creating a new connection, this event MUST be published just before the socket is created
* - ``ServerHeartbeatSucceededEvent``
- Published on successful completion of the server monitor's ``hello`` or legacy hello call.
* - ``ServerHeartbeatFailedEvent``
Expand Down Expand Up @@ -251,7 +251,7 @@ Events that MUST be published (with their conditions) are as follows.
/**
* Fired when the server monitor's ``hello`` or legacy hello command is started - immediately before
* the ``hello`` or legacy hello command is serialized into raw BSON and written to the socket.
* When the monitor is creating a new monitoring connection, this event is fired just after the
* When the monitor is creating a new monitoring connection, this event is fired just before the
* socket is opened.
*/
interface ServerHeartbeatStartedEvent {
Expand Down Expand Up @@ -614,6 +614,11 @@ The unstructured form SHOULD be as follows, using the values defined in the stru
Heartbeat started for {{serverHost}}:{{serverPort}} on connection with driver-generated ID {{driverConnectionId}} and server-generated ID
{{serverConnectionId}} in topology with ID {{topologyId}}. Awaited: {{awaited}}

If the ``serverConnectionId`` is not yet known at the time this log is emitted, the unstructured form should be as follows:

Heartbeat started for {{serverHost}}:{{serverPort}} on connection with driver-generated ID {{driverConnectionId}} in topology with ID
{{topologyId}}. Awaited: {{awaited}}

"Server Heartbeat Succeeded" Log Message
----------------------------------------
This message MUST be published under the same circumstances as a ``ServerHeartbeatSucceededEvent`` as detailed in `Events API <#events-api>`_.
Expand Down
2 changes: 1 addition & 1 deletion source/server-discovery-and-monitoring/tests/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Heartbeat Tests

#. Assert that the event array has the following contents in the same order::

['client connected', 'serverHeartbeatStartedEvent', 'client hello received', 'serverHeartbeatFailedEvent']
['serverHeartbeatStartedEvent', 'client connected', 'client hello received', 'serverHeartbeatFailedEvent']

.. Section for links.
Expand Down

0 comments on commit 6b93f0c

Please sign in to comment.