Skip to content

Commit 7400721

Browse files
committed
Fix issues from code review
1 parent 3bbef60 commit 7400721

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

src/libmongoc/doc/mongoc_server_description_ismaster.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Parameters
2929
Description
3030
-----------
3131

32-
The client or client pool periodically runs a `"hello" <https://docs.mongodb.org/manual/reference/command/isMaster/>`_ command on each server, to update its view of the MongoDB deployment. Use :symbol:`mongoc_client_get_server_descriptions()` and ``mongoc_server_description_hello()`` to get the most recent "hello" response.
32+
The client or client pool periodically runs a `"hello" <https://docs.mongodb.org/manual/reference/command/hello/>`_ command on each server, to update its view of the MongoDB deployment. Use :symbol:`mongoc_client_get_server_descriptions()` and ``mongoc_server_description_hello()`` to get the most recent "hello" response.
3333

3434
Returns
3535
-------

src/libmongoc/src/mongoc/mongoc-error-private.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,11 @@ typedef enum {
4444
MONGOC_SERVER_ERR_RETRYCHANGESTREAM = 234,
4545
MONGOC_SERVER_ERR_EXCEEDEDTIMELIMIT = 262,
4646
MONGOC_SERVER_ERR_SOCKETEXCEPTION = 9001,
47-
MONGOC_SERVER_ERR_NOTMASTER = 10107,
4847
MONGOC_SERVER_ERR_NOTPRIMARY = 10107,
4948
MONGOC_SERVER_ERR_INTERRUPTEDATSHUTDOWN = 11600,
5049
MONGOC_SERVER_ERR_INTERRUPTEDDUETOREPLSTATECHANGE = 11602,
5150
MONGOC_SERVER_ERR_STALECONFIG = 13388,
52-
MONGOC_SERVER_ERR_NOTMASTERNOSLAVEOK = 13435,
5351
MONGOC_SERVER_ERR_NOTPRIMARYNOSECONDARYOK = 13435,
54-
MONGOC_SERVER_ERR_NOTMASTERORSECONDARY = 13436,
5552
MONGOC_SERVER_ERR_NOTPRIMARYORSECONDARY = 13436,
5653
MONGOC_SERVER_ERR_LEGACYNOTPRIMARY = 10058
5754
} mongoc_server_err_t;

src/libmongoc/src/mongoc/mongoc-interrupt-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/* Creates a stream to use to interrupt calls to mongoc_stream_poll.
2525
*
2626
* The expected use is to cancel in-progress hello commands (especially for
27-
* awaitable hello). An hello command may not respond for a long time, so
27+
* awaitable hello). A hello command may not respond for a long time, so
2828
* reading the reply may block on mongoc_stream_poll until data is readable. To
2929
* interrupt mongoc_stream_poll, a stream retrieved by
3030
* _mongoc_interrupt_get_stream can be added to the call of poll. Any other

src/libmongoc/src/mongoc/mongoc-server-description.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ mongoc_server_description_handle_hello (mongoc_server_description_t *sd,
562562
NULL);
563563
sd->has_hello_response = true;
564564

565-
/* Only reinitialize the topology version if we have an hello response.
565+
/* Only reinitialize the topology version if we have a hello response.
566566
* Resetting a server description should not effect the topology version. */
567567
bson_reinit (&sd->topology_version);
568568

src/libmongoc/src/mongoc/mongoc-server-monitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ _server_monitor_setup_connection (mongoc_server_monitor_t *server_monitor,
797797
RETURN (ret);
798798
}
799799

800-
/* Perform an hello check of a server.
800+
/* Perform a hello check of a server.
801801
*
802802
* Called only by server monitor thread.
803803
* Caller must not hold any locks.

src/libmongoc/tests/mock_server/mock-server.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,10 +1051,10 @@ mock_server_receives_legacy_hello (mock_server_t *server,
10511051
*
10521052
* Returns:
10531053
* A request you must request_destroy, or NULL if the current
1054-
* request is not an hello command.
1054+
* request is not a hello command.
10551055
*
10561056
* Side effects:
1057-
* Logs if the current request is not an hello command.
1057+
* Logs if the current request is not a hello command.
10581058
*
10591059
*--------------------------------------------------------------------------
10601060
*/

src/libmongoc/tests/test-mongoc-cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ _test_not_primary (bool pooled,
10761076
BSON_ASSERT (sd->type == MONGOC_SERVER_STANDALONE);
10771077

10781078
/*
1079-
* command error marks server Unknown iff it's a "not primary" error
1079+
* command error marks server Unknown if it's a "not primary" error
10801080
*/
10811081
future = run_command (client);
10821082
request = mock_server_receives_request (server);

0 commit comments

Comments
 (0)