Skip to content

Commit 2feb6dd

Browse files
authored
DOCSP-49692: Upgrade guide updates (#117)
* DOCSP-49692: Upgrade guide updates * edits
1 parent cb217fe commit 2feb6dd

File tree

2 files changed

+207
-137
lines changed

2 files changed

+207
-137
lines changed

source/upgrade.txt

Lines changed: 182 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,193 @@ The breaking changes in this section are categorized by the driver version that
6060
them. When upgrading driver versions, address all the breaking changes between the current
6161
and upgrade versions.
6262

63-
.. example:: Upgrading from Version 1.26
63+
The {+driver-short+} consists of two libraries: ``{+libbson+}`` and ``{+libmongoc+}``. The
64+
sections of this guide describe the breaking changes included in each library.
6465

65-
If you're upgrading the {+driver-short+} from version 1.26 to version 1.27,
66-
address all breaking changes listed for versions 1.27.0 to 1.27.6, if any.
66+
.. example:: Upgrading to Version 2.0.0
6767

68-
.. _c-version-1.24.0-breaking-changes:
68+
If you're upgrading the {+driver-short+} from version 1.x to version 2.0.0,
69+
address all breaking changes that are listed for versions 1.x up to and
70+
including version 2.0.0
6971

70-
Version 1.24.0 Breaking Changes
71-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72+
.. _c-version-2.0.0-breaking-changes:
7273

73-
The 1.24.0 release of ``libmongoc``, one of the libraries constituting the C driver, introduces
74-
the following backward-breaking change:
74+
Version 2.0.0
75+
~~~~~~~~~~~~~
7576

76-
- Requires {+mdb-server+} version 7.0 and later to use Queryable Encryption.
77+
{+libbson+} Breaking Changes in v2.0.0
78+
``````````````````````````````````````
79+
80+
The 2.0.0 release of ``{+libbson+}`` includes the following breaking changes:
81+
82+
- Reduces the value of the ``BSON_ERROR_BUFFER_SIZE`` macro from ``504``
83+
to ``503`` to reserve the final byte for internal use.
84+
85+
- Renames the following ``pkg-config`` files:
86+
87+
- ``libbson-1.0``: Renamed to ``bson2``
88+
- ``libbson-static-1.0``: Renamed to ``bson2-static``
89+
90+
- Removes the ``bson-1.0`` CMake package. Instead, use ``bson`` and
91+
specify a version or version range to be imported, as shown in the
92+
following example:
93+
94+
.. code-block:: c
95+
96+
find_package(bson 1.30...2.0)
97+
98+
- Renames the following imported targets:
99+
100+
- ``mongo::bson_static``: Renamed to ``bson::static``
101+
- ``mongo::bson_shared``: Renamed to ``bson::shared``
102+
103+
- Adds the ``bson::bson`` target, which points to either the static
104+
library or shared library depending on the value of the
105+
``BSON_DEFAULT_IMPORTED_LIBRARY_TYPE`` CMake option. If you don't set this option and
106+
both library types are available, ``bson::bson`` uses
107+
the static library.
108+
109+
{+libmongoc+} Breaking Changes in v2.0.0
110+
````````````````````````````````````````
111+
112+
The 2.0 release of ``{+libmongoc+}`` includes the following breaking changes:
113+
114+
- If you pass the ``batchSize:0`` option to ``mongoc_client_watch``, ``mongoc_database_watch``,
115+
or ``mongoc_collection_watch``, the ``aggregate`` command no longer ignores this option and
116+
applies it.
117+
118+
- Removes ``bson_oid_init_sequence``. Instead, use ``bson_oid_init``.
119+
120+
- Changes the return type of ``mongoc_server_description_host`` from ``mongoc_host_list_t *``
121+
to ``const mongoc_host_list_t *``.
122+
123+
- Implements the following changes to URI authentication credentials validation, which
124+
apply when creating a new ``mongoc_uri_t`` object from a connection string:
125+
126+
- Requires that usernames are non-empty for all authentication mechanisms.
127+
- Validates username and password specification requirements and returns
128+
a client error for the specified authentication mechanism.
129+
- For the ``MONGODB-AWS`` authentication mechanism, the ``authSource`` value defaults to
130+
``$external``.
131+
- Validates ``authMechanism`` values and returns a client error for invalid values.
132+
- Validates ``authMechanismProperties`` values and returns a client error for invalid
133+
properties for the specified authentication mechanism.
134+
- Correctly parses colon (``:``) characters within ``authMechanismProperties`` values.
135+
For example, setting ``authMechanismProperties=A:B,C:D:E,F:G`` caused the driver to
136+
parse the value as ``{'A': 'B', 'C': 'D:E,F:G'}``. This is now parsed as
137+
``{'A': 'B': 'C': 'D:E', 'F': 'G'}``.
138+
139+
- Generates an error if you call ``mongoc_bulk_operation_execute`` on the same
140+
``mongoc_bulk_operation_t`` repeatedly.
141+
142+
- Consistently applies the ``__cdecl`` calling convention to function declarations in
143+
the public API.
144+
145+
- ``mongoc_client_set_ssl_opts`` ignores a pooled ``mongoc_client_t`` and logs an error.
146+
Before popping a client, use ``mongoc_client_pool_set_ssl_opts`` to set TLS options on
147+
a ``mongoc_client_pool_t``.
148+
149+
- ``mongoc_client_set_ssl_stream_initiator`` ignores a pooled ``mongoc_client_t`` and
150+
logs an error.
151+
152+
- Renames the following ``pkg-config`` files:
153+
154+
- ``libmongoc-1.0``: Renamed to ``mongoc2``
155+
- ``libmongoc-static-1.0``: Renamed to ``mongoc2-static``
156+
157+
- Removes the ``mongoc-1.0`` CMake package. Instead, use ``mongoc`` and
158+
specify a version or version range to be imported, as shown in the
159+
following example:
160+
161+
.. code-block:: c
162+
163+
find_package(mongoc 1.30...2.0)
164+
165+
- Renames the following imported targets:
166+
167+
- ``mongo::mongoc_static``: Renamed to ``mongoc::static``
168+
- ``mongo::mongoc_shared``: Renamed to ``mongoc::shared``
169+
170+
- Adds the ``mongoc::mongoc`` target, which points to either the static
171+
library or shared library depending on the value of the
172+
``MONGOC_DEFAULT_IMPORTED_LIBRARY_TYPE`` CMake option. If you don't set this option and
173+
both library types are available, ``mongoc::mongoc`` uses
174+
the static library.
175+
176+
.. _c-version-1.29.0-breaking-changes:
177+
178+
Version 1.29.0
179+
~~~~~~~~~~~~~~
180+
181+
{+libmongoc+} Breaking Changes in v1.29.0
182+
`````````````````````````````````````````
183+
184+
The 1.29.0 release of ``{+libmongoc+}`` includes the following breaking changes:
185+
186+
- Drops support for Visual Studio 2013
187+
- Raises required version of the ``libmongocrypt`` dependency to 1.12.0 to
188+
support the In-Use Encryption feature
189+
190+
.. _c-version-1.28.0-breaking-changes:
191+
192+
Version 1.28.0
193+
~~~~~~~~~~~~~~
194+
195+
{+libbson+} Breaking Changes in v1.28.0
196+
`````````````````````````````````````
197+
198+
The 1.28.0 release of ``{+libbson+}`` includes the following breaking changes:
199+
200+
- Removes automatic ``ccache`` detection and usage
201+
- Removes ``Mongo_USE_CCACHE``
202+
203+
{+libmongoc+} Breaking Changes in v1.28.0
204+
`````````````````````````````````````````
205+
206+
The 1.28.0 release of ``{+libmongoc+}`` includes the following breaking changes:
207+
208+
- Raises the minimum wire protocol version from ``6`` to ``7``
209+
- Raises the required ``libmongocrypt`` version to v1.11.0 to support In-Use
210+
Encryption
211+
212+
.. _c-version-1.27.0-breaking-changes:
213+
214+
Version 1.27.0
215+
~~~~~~~~~~~~~~
216+
217+
{+libmongoc+} Breaking Changes in v1.27.0
218+
`````````````````````````````````````````
219+
220+
The 1.27.0 release of ``{+libmongoc+}`` includes the following breaking changes:
221+
222+
- Raises the required version of libmongocrypt to 1.10.0 to support In-Use
223+
Encryption. This corresponds to the CMake option ``ENABLE_CLIENT_SIDE_ENCRYPTION``.
224+
225+
.. _c-version-1.26.2-breaking-changes:
226+
227+
Version 1.26.2
228+
~~~~~~~~~~~~~~
229+
230+
{+libmongoc+} Breaking Changes in v1.26.2
231+
`````````````````````````````````````````
232+
233+
The 1.26.2 release of ``{+libmongoc+}`` includes the following breaking changes:
234+
235+
- By default, disables plugin loading with Cyrus SASL on Windows.
236+
To re-enable, set the CMake option ``CYRUS_PLUGIN_PATH_PREFIX`` to the
237+
absolute path prefix of the Cyrus SASL plugins.
238+
239+
.. _c-version-1.24-breaking-changes:
240+
241+
Version 1.24
242+
~~~~~~~~~~~~
243+
244+
{+libmongoc+} Breaking Changes in v1.24
245+
```````````````````````````````````````
246+
247+
The 1.24 release of ``{+libmongoc+}`` includes the following breaking changes:
248+
249+
- Requires {+mdb-server+} version 7.0 and later to use Queryable Encryption
77250

78251
.. _c-server-release-compatability-changes:
79252

0 commit comments

Comments
 (0)