Skip to content

CDRIVER-3985 Remove Oppressive Terminology From Code #794

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

Merged
merged 13 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,7 @@ These notable bugs have been fixed since 1.1.11:
authentication failure
* Off-by-one error in mongoc_gridfs_file_seek with mode SEEK_END
* The writeConcernErrors field of bulk results is properly formatted.
* A cursor with a server "hint" sets slaveOkay and / or $readPreference.
* A cursor with a server "hint" sets secondaryOk and / or $readPreference.
* Destroying an exhaust cursor must close its socket
* "wtimeoutms" was ignored for write concerns besides "majority".
* Bulk write operations might fail in mixed-version sharded clusters with
Expand Down Expand Up @@ -2760,7 +2760,7 @@ In this release, you will find the following changes:
* client command functions can now take a fully qualified namespace.
* collections can now support names that indicate a command namespace.
* Commands will no longer fail if they do not contain an "ok" field.
* OP_QUERY will now set the slaveOk bit in the wire protocol if
* OP_QUERY will now set the secondaryOk bit in the wire protocol if
* readPreferences are set to non-PRIMARY.
* Various documentation and build fixes.

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the `MongoDB Community Forums`_ to ask for help. Please include in your post all
information:

- The version of the driver you are trying to build (branch or tag).
- Examples: master branch, 1.9.5 tag
- Examples: ``r1.17`` (branch), ``1.9.5`` (tag)
- Host OS, version, and architecture.
- Examples: Windows 10 64-bit x86, Ubuntu 16.04 64-bit x86, macOS 10.13
- C Compiler and version.
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ set (test-libmongoc-sources
${PROJECT_SOURCE_DIR}/tests/test-mongoc-socket.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-speculative-auth.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-stream.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-streamable-ismaster.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-streamable-hello.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-thread.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-timeout.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-topology-description.c
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/connection-pooling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To activate pooled mode, create a :symbol:`mongoc_client_pool_t`:

mongoc_client_pool_t *pool = mongoc_client_pool_new (uri);

When your program first calls :symbol:`mongoc_client_pool_pop`, the pool launches monitoring threads in the background. Monitoring threads independently connect to all servers in the connection string. As monitoring threads receive ismaster responses from the servers, they update the shared view of the server topology. Additional monitoring threads and connections are created as new servers are discovered. Monitoring threads are terminated when servers are removed from the shared view of the server topology.
When your program first calls :symbol:`mongoc_client_pool_pop`, the pool launches monitoring threads in the background. Monitoring threads independently connect to all servers in the connection string. As monitoring threads receive hello responses from the servers, they update the shared view of the server topology. Additional monitoring threads and connections are created as new servers are discovered. Monitoring threads are terminated when servers are removed from the shared view of the server topology.

Each thread that executes MongoDB operations must check out a client from the pool:

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ A build configuration description similar to the one above will be displayed, th
Preparing a build from a git repository clone
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Clone the repository and prepare the build on the current master branch or a particular release tag:
Clone the repository and prepare the build on the current branch or a particular release tag:

.. parsed-literal::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Synopsis
mongoc_apm_server_heartbeat_failed_get_awaited (
const mongoc_apm_server_heartbeat_failed_t *event);

Returns whether this event came from an awaitable isMaster.
Returns whether this event came from an awaitable hello.

Parameters
----------
Expand All @@ -22,7 +22,7 @@ Parameters
Returns
-------

A bool indicating whether the heartbeat event came from an awaitable isMaster.
A bool indicating whether the heartbeat event came from an awaitable hello.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Heartbeat-failed event
Synopsis
--------

An event notification sent when the driver failed to send an "isMaster" command to check the status of a server.
An event notification sent when the driver failed to send a "hello" command to check the status of a server.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Synopsis
mongoc_apm_server_heartbeat_started_get_awaited (
const mongoc_apm_server_heartbeat_started_t *event);

Returns whether this event came from an awaitable isMaster.
Returns whether this event came from an awaitable hello.

Parameters
----------
Expand All @@ -22,7 +22,7 @@ Parameters
Returns
-------

A bool indicating whether the heartbeat event came from an awaitable isMaster.
A bool indicating whether the heartbeat event came from an awaitable hello.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Heartbeat-started event
Synopsis
--------

An event notification sent when the driver begins executing an "isMaster" command to check the status of a server.
An event notification sent when the driver begins executing a "hello" command to check the status of a server.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Synopsis
mongoc_apm_server_heartbeat_succeeded_get_awaited (
const mongoc_apm_server_heartbeat_succeeded_t *event);

Returns whether this event came from an awaitable isMaster.
Returns whether this event came from an awaitable hello.

Parameters
----------
Expand All @@ -22,7 +22,7 @@ Parameters
Returns
-------

A bool indicating whether the heartbeat event came from an awaitable isMaster.
A bool indicating whether the heartbeat event came from an awaitable hello.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Heartbeat-succeeded event
Synopsis
--------

An event notification sent when the driver completes an "isMaster" command to check the status of a server.
An event notification sent when the driver completes a "hello" command to check the status of a server.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Synopsis
mongoc_apm_set_server_heartbeat_failed_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_failed_cb_t cb);

Receive an event notification whenever the driver fails to send an "isMaster" command to check the status of a server.
Receive an event notification whenever the driver fails to send a "hello" command to check the status of a server.

Parameters
----------

* ``callbacks``: A :symbol:`mongoc_apm_callbacks_t`.
* ``cb``: A function to call with a :symbol:`mongoc_apm_server_heartbeat_failed_t` whenever the driver fails to send an "isMaster" command to check the status of a server.
* ``cb``: A function to call with a :symbol:`mongoc_apm_server_heartbeat_failed_t` whenever the driver fails to send a "hello" command to check the status of a server.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Synopsis
mongoc_apm_set_server_heartbeat_started_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_started_cb_t cb);

Receive an event notification whenever the driver begins executing an "isMaster" command to check the status of a server.
Receive an event notification whenever the driver begins executing a "hello" command to check the status of a server.

Parameters
----------

* ``callbacks``: A :symbol:`mongoc_apm_callbacks_t`.
* ``cb``: A function to call with a :symbol:`mongoc_apm_server_heartbeat_started_t` whenever the driver begins executing an "isMaster" command to check the status of a server.
* ``cb``: A function to call with a :symbol:`mongoc_apm_server_heartbeat_started_t` whenever the driver begins executing a "hello" command to check the status of a server.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Synopsis
mongoc_apm_set_server_heartbeat_succeeded_cb (mongoc_apm_callbacks_t *callbacks,
mongoc_apm_server_heartbeat_succeeded_cb_t cb);

Receive an event notification whenever the driver completes an "isMaster" command to check the status of a server.
Receive an event notification whenever the driver completes a "hello" command to check the status of a server.

Parameters
----------

* ``callbacks``: A :symbol:`mongoc_apm_callbacks_t`.
* ``cb``: A function to call with a :symbol:`mongoc_apm_server_heartbeat_succeeded_t` whenever the driver completes an "isMaster" command to check the status of a server.
* ``cb``: A function to call with a :symbol:`mongoc_apm_server_heartbeat_succeeded_t` whenever the driver completes a "hello" command to check the status of a server.

.. seealso::

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_client_set_appname.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Synopsis
bool
mongoc_client_set_appname (mongoc_client_t *client, const char *appname)

Sets the application name for this client. This string, along with other internal driver details, is sent to the server as part of the initial connection handshake (`"isMaster" <https://docs.mongodb.org/manual/reference/command/isMaster/>`_).
Sets the application name for this client. This string, along with other internal driver details, is sent to the server as part of the initial connection handshake (`"hello" <https://docs.mongodb.org/manual/reference/command/hello/>`_).

``appname`` is copied, and doesn't have to remain valid after the call to ``mongoc_client_set_appname()``.

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_collection_replace_one.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ A write concern timeout or write concern error is considered a failure.

.. seealso::

| `MongoDB update command documentation <https://docs.mongodb.com/master/reference/command/update/>`_ for more information on the update options.
| `MongoDB update command documentation <https://docs.mongodb.com/manual/reference/command/update/>`_ for more information on the update options.

| :symbol:`mongoc_collection_update_one`

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_collection_update_many.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ A write concern timeout or write concern error is considered a failure.

.. seealso::

| `MongoDB update command documentation <https://docs.mongodb.com/master/reference/command/update/>`_ for more information on the update options.
| `MongoDB update command documentation <https://docs.mongodb.com/manual/reference/command/update/>`_ for more information on the update options.

| :symbol:`mongoc_collection_update_one`

2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_collection_update_one.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Example

.. seealso::

| `MongoDB update command documentation <https://docs.mongodb.com/master/reference/command/update/>`_ for more information on the update options.
| `MongoDB update command documentation <https://docs.mongodb.com/manual/reference/command/update/>`_ for more information on the update options.

| :symbol:`mongoc_collection_update_many`

Expand Down
4 changes: 2 additions & 2 deletions src/libmongoc/doc/mongoc_query_flags_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Synopsis
typedef enum {
MONGOC_QUERY_NONE = 0,
MONGOC_QUERY_TAILABLE_CURSOR = 1 << 1,
MONGOC_QUERY_SLAVE_OK = 1 << 2,
MONGOC_QUERY_SECONDARY_OK = 1 << 2,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good thinking. I originally thought you removed MONGOC_QUERY_SLAVE_OK entirely. But leaving it out of documentation seems like a good idea.

I filed CDRIVER-4006 to track removing public symbols in the next major release.

MONGOC_QUERY_OPLOG_REPLAY = 1 << 3,
MONGOC_QUERY_NO_CURSOR_TIMEOUT = 1 << 4,
MONGOC_QUERY_AWAIT_DATA = 1 << 5,
Expand All @@ -32,7 +32,7 @@ Flag Values
============================== =====================================================================================================================================================
MONGOC_QUERY_NONE Specify no query flags.
MONGOC_QUERY_TAILABLE_CURSOR Cursor will not be closed when the last data is retrieved. You can resume this cursor later.
MONGOC_QUERY_SLAVE_OK Allow query of replica set secondaries.
MONGOC_QUERY_SECONDARY_OK Allow query of replica set secondaries.
MONGOC_QUERY_OPLOG_REPLAY Used internally by MongoDB.
MONGOC_QUERY_NO_CURSOR_TIMEOUT The server normally times out an idle cursor after an inactivity period (10 minutes). This prevents that.
MONGOC_QUERY_AWAIT_DATA Use with MONGOC_QUERY_TAILABLE_CURSOR. Block rather than returning no data. After a period, time out.
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_read_concern_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MONGOC_READ_CONCERN_LEVEL_SNAPSHOT Level "snapshot". 4.0

For the sake of compatibility with future versions of MongoDB, :symbol:`mongoc_read_concern_set_level` allows any string, not just this list of known read concern levels.

See `Read Concern Levels <https://docs.mongodb.com/master/reference/read-concern/#read-concern-levels>`_ in the MongoDB manual for more information about the individual read concern levels.
See `Read Concern Levels <https://docs.mongodb.com/manual/reference/read-concern/#read-concern-levels>`_ in the MongoDB manual for more information about the individual read concern levels.

.. only:: html

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_read_prefs_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ All interfaces use the same member selection logic to choose the member to which
Max Staleness
-------------

When connected to replica set running MongoDB 3.4 or later, the driver estimates the staleness of each secondary based on lastWriteDate values provided in server isMaster responses.
When connected to replica set running MongoDB 3.4 or later, the driver estimates the staleness of each secondary based on lastWriteDate values provided in server hello responses.

Max Staleness is the maximum replication lag in seconds (wall clock time) that a secondary can suffer and still be eligible for reads. The default is ``MONGOC_NO_MAX_STALENESS``, which disables staleness checks. Otherwise, it must be a positive integer at least ``MONGOC_SMALLEST_MAX_STALENESS_SECONDS`` (90 seconds).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:man_page: mongoc_server_description_hello_response

mongoc_server_description_hello_response()
===============================================
==========================================

Synopsis
--------
Expand All @@ -21,7 +21,7 @@ Description
-----------

The client or client pool periodically runs a
`"hello" <https://docs.mongodb.org/manual/reference/command/isMaster/>`_
`"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_response()`` to get the most recent "hello"
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_server_description_ismaster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Parameters
Description
-----------

The client or client pool periodically runs an `"isMaster" <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_ismaster()`` to get the most recent "isMaster" response.
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_response()`` to get the most recent "hello" response.

Returns
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Parameters
Description
-----------

Get the last point in time when we processed an ismaster for this server, or, if we have not processed any ismasters since creating the description, the time the server description was initialized.
Get the last point in time when we processed a hello for this server, or, if we have not processed any hellos since creating the description, the time the server description was initialized.

Returns
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Parameters
Description
-----------

Get the server's round trip time in milliseconds. This is the client's measurement of the duration of an "ismaster" command.
Get the server's round trip time in milliseconds. This is the client's measurement of the duration of a "hello" command.

5 changes: 2 additions & 3 deletions src/libmongoc/doc/mongoc_uri_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Constant Key Des
MONGOC_URI_HEARTBEATFREQUENCYMS heartbeatfrequencyms The interval between server monitoring checks. Defaults to 10,000ms (10 seconds) in pooled (multi-threaded) mode, 60,000ms (60 seconds) in non-pooled mode (single-threaded).
MONGOC_URI_SERVERSELECTIONTIMEOUTMS serverselectiontimeoutms A timeout in milliseconds to block for server selection before throwing an exception. The default is 30,0000ms (30 seconds).
MONGOC_URI_SERVERSELECTIONTRYONCE serverselectiontryonce If "true", the driver scans the topology exactly once after server selection fails, then either selects a server or returns an error. If it is false, then the driver repeatedly searches for a suitable server for up to ``serverSelectionTimeoutMS`` milliseconds (pausing a half second between attempts). The default for ``serverSelectionTryOnce`` is "false" for pooled clients, otherwise "true". Pooled clients ignore serverSelectionTryOnce; they signal the thread to rescan the topology every half-second until serverSelectionTimeoutMS expires.
MONGOC_URI_SOCKETCHECKINTERVALMS socketcheckintervalms Only applies to single threaded clients. If a socket has not been used within this time, its connection is checked with a quick "isMaster" call before it is used again. Defaults to 5,000ms (5 seconds).
MONGOC_URI_SOCKETCHECKINTERVALMS socketcheckintervalms Only applies to single threaded clients. If a socket has not been used within this time, its connection is checked with a quick "hello" call before it is used again. Defaults to 5,000ms (5 seconds).
MONGOC_URI_DIRECTCONNECTION directconnection If "true", the driver connects to a single server directly and will not monitor additional servers. If "false", the driver connects based on the presence and value of the ``replicaSet`` option.
========================================== ================================= =========================================================================================================================================================================================================================

Expand Down Expand Up @@ -244,7 +244,7 @@ When connected to a replica set, the driver chooses which member to query using
========================================== ================================= =======================================================================================================================================================================
Constant Key Description
========================================== ================================= =======================================================================================================================================================================
MONGOC_URI_READPREFERENCE readpreference Specifies the replica set read preference for this connection. This setting overrides any slaveOk value. The read preference values are the following:
MONGOC_URI_READPREFERENCE readpreference Specifies the replica set read preference for this connection. This setting overrides any secondaryOk value. The read preference values are the following:

* primary (default)
* primaryPreferred
Expand All @@ -269,7 +269,6 @@ For historical reasons, the following options are available. They should however
Constant Key Description
========================================== ================================= =======================================================================================================================================================================
MONGOC_URI_SAFE safe {true|false} Same as w={1|0}
MONGOC_URI_SLAVEOK slaveok When set, same as readPreference=secondaryPreferred
========================================== ================================= =======================================================================================================================================================================

.. only:: html
Expand Down
Loading