You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and map-reduce methods on `MongoCollection <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#mapReduce(com.mongodb.client.ClientSession,java.lang.String,java.lang.String)>`__
36
-
are deprecated in MongoDB v4.2 and later. They will be replaced by the
37
-
aggregation framework and removed in a future release.
38
16
39
17
.. _version-4.10:
40
18
@@ -60,342 +38,4 @@ New features of the 4.10 driver release include:
60
38
- Support for :ref:`qe-manual-feature-qe` (QE). To learn
61
39
more about the requirements for using the QE feature, see the
and `LoggerSettings.Builder.maxDocumentLength() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/LoggerSettings.Builder.html#maxDocumentLength(int)>`__
88
-
methods that let you specify a maximum length for the extended JSON representation of a
89
-
BSON document in a log message.
90
-
91
-
.. _version-4.8:
92
-
93
-
What's New in 4.8
94
-
-----------------
95
-
96
-
.. warning:: Breaking Changes in v4.8
97
-
98
-
The v4.8 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.8>`
99
-
and :ref:`<java-server-release-change-v4.8>` for more information.
100
-
101
-
.. important:: Deprecation Notice
102
-
103
-
The ``IterableCodec`` and ``MapCodec`` classes are deprecated. Instead,
104
-
use ``CollectionCodec`` and ``MapCodecV2``.
105
-
These support any class that implements ``Collection`` or
106
-
``Map``.
107
-
108
-
Behavioral changes with the 4.8 driver release include:
109
-
110
-
- Requirement that you add an explicit dependency on the ``org.bson.codecs.record``
111
-
module if your application deploys the driver in an OSGi container and
112
-
relies on the driver for encoding and decoding Java records.
113
-
- Logging of new connection messages at the ``DEBUG`` level instead
114
-
of at ``INFO``.
115
-
116
-
New features of the 4.8 driver release include:
117
-
118
-
- Support for authentication with AWS. The driver takes an
119
-
optional dependency on both AWS SDK version 1 and version 2.
120
-
- Support for obtaining credentials from the environment for both GCP
121
-
and Azure for in-use encryption.
122
-
- Support for deserialization of records containing components with
123
-
generic parameters.
124
-
- Support for deserialization of records containing components with more
125
-
specific container types, such as ``SortedSet``, ``NavigableMap``, ``LinkedList``,
126
-
or ``TreeSet``.
127
-
- Support for recursive record types, records whose type
128
-
definitions contain cycles.
129
-
- Inclusion of the ``disambiguatedPaths`` field in change stream update events
130
-
when the ``showExpandedEvents`` server feature is enabled on MongoDB v6.1
131
-
and later. Learn more about this field from the `getDisambiguatedPaths() <https://mongodb.github.io/mongo-java-driver/4.8/apidocs/mongodb-driver-core/com/mongodb/client/model/changestream/UpdateDescription.html#getDisambiguatedPaths()>`__
132
-
API documentation. Learn more about the ``showExpandedEvents`` setting from
133
-
the :manual:`Expanded Events </reference/change-events/#expanded-events>`
134
-
server documentation.
135
-
136
-
.. _version-4.7.1:
137
-
.. _version-4.7:
138
-
139
-
What's New in 4.7.1
140
-
-------------------
141
-
142
-
The 4.7.1 driver patches a bug that affects
143
-
Client-Side Field Level Encryption and Queryable Encryption.
144
-
The bug can cause data corruption when rotating :ref:`Data Encryption Keys <csfle-key-architecture>`
145
-
(DEKs) encrypted with a :ref:`Customer Master Key <csfle-key-architecture>`
146
-
hosted on Google Cloud Key Management Service or Azure
147
-
Key Vault. The bug was present in version 4.7.0 of the driver
148
-
in the ``RewrapManyDataKey`` method and causes the
149
-
loss of your DEKs.
150
-
151
-
.. important:: Back Up your Key Vault Collection
152
-
153
-
Always back up your :ref:`Key Vault Collection <csfle-reference-key-vault>`
154
-
before you rotate your DEKs. If you lose your DEKs, you lose access to all
155
-
the data encrypted with those keys.
156
-
157
-
.. _version-4.7.0:
158
-
159
-
What's New in 4.7
160
-
-----------------
161
-
162
-
.. warning:: Breaking Changes in v4.7
163
-
164
-
The v4.7 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.7>`
165
-
for more information.
166
-
167
-
New features of the 4.7 driver release include:
168
-
169
-
- Added full support for MongoDB 6.0.
170
-
171
-
- Added the following change stream support improvements:
172
-
173
-
- Enhanced pre-image and post-image support for :ref:`change streams <java-usage-watch>`.
174
-
Change stream watch helpers now accept ``whenAvailable`` and ``required``
175
-
for the ``fullDocument`` option. See the :manual:`change stream </changeStreams/#change-streams-with-document-pre--and-post-images>`
176
-
reference documentation for more information.
177
-
- Added a new ``fullDocumentBeforeChange`` option, which accepts
178
-
``whenAvailable`` and ``required``.
179
-
- Change events now include a ``fullDocumentBeforeChange`` field
180
-
when configured for display on your MongoDB collection.
181
-
- Added ``showExpandedEvents`` support for change streams.
182
-
- Added ``wallTime`` support to the ``ChangeStreamDocument`` class.
183
-
184
-
- Added :ref:`clustered index <java-clustered-indexes>` creation support.
185
-
- Support for new features related to :ref:`qe-manual-feature-qe`,
186
-
including support for automatic encryption (MongoDB v6.0 Enterprise or later
187
-
is required) and manual encryption.
188
-
189
-
- Support for the new Queryable Encryption shared library, which removes the need
190
-
for the ``mongocryptd`` process. The queryable encryption shared library requires
and the `ClientEncryptionSettings.Builder.kmsProviderPropertySuppliers() <https://mongodb.github.io/mongo-java-driver/4.6/apidocs/mongodb-driver-core/com/mongodb/ClientEncryptionSettings.html#getKmsProviderPropertySuppliers()>`__
229
-
API documentation for more information.
230
-
- Added compatibility to ``org.mongodb:mongodb-crypt``, a dependency for
231
-
CSFLE, for Apple M1 ARM-based hardware.
232
-
- Added a service provider interface (SPI) to allow the driver to specify
233
-
a custom DNS client. See the `DnsClient <https://mongodb.github.io/mongo-java-driver/4.6/apidocs/mongodb-driver-core/com/mongodb/spi/dns/DnsClient.html>`__
234
-
and the `DnsClientProvider <https://mongodb.github.io/mongo-java-driver/4.6/apidocs/mongodb-driver-core/com/mongodb/spi/dns/DnsClientProvider.html>`__
235
-
interface API documentation for more information.
236
-
- Added driver support for encoding and decoding between `Java records <https://docs.oracle.com/en/java/javase/17/language/records.html>`__
237
-
and BSON documents, which is enabled by default. See :ref:`<fundamentals-records>`
238
-
for more information.
239
-
240
-
.. _version-4.5:
241
-
.. _version-4.5.1:
242
-
243
-
What's New in 4.5.1
244
-
-------------------
245
-
246
-
If the DNS server returns an NXDomain error,
247
-
indicating a non-existent domain, the 4.5.1
248
-
driver no longer throws an exception.
249
-
250
-
.. _version-4.5.0:
251
-
252
-
What's New in 4.5
253
-
-----------------
254
-
255
-
New features of the 4.5 Java driver release include:
256
-
257
-
- Added support for specifying custom service names of SRV resource
258
-
records. See the ``srvServiceName`` setting in the :ref:`Connection
259
-
Options <connection-options>` guide for more information.
260
-
- Added support to customize UUID representation in a codec registry using
261
-
the ``CodecRegistries.withUuidRepresentation()`` method.
262
-
- Added support for overriding listener settings in ``ClusterSettings``,
263
-
``ServerSettings`` and ``ConnectionPoolSettings`` builders.
264
-
- All events received by ``ClusterListener``, ``ServerListener``, and
265
-
``ServerMonitorListener`` are now totally ordered using
266
-
a happens-before relationship when the listeners are not shared by
267
-
different MongoClient instances. To learn more about the happens-before
268
-
ordering, see `Happens-before Order <https://docs.oracle.com/javase/specs/jls/se17/html/jls-17.html#jls-17.4.5>`__
269
-
in the Java Language Specification.
270
-
- Added ``EnumCodec`` and ``EnumCodecProvider`` classes to separate codec
271
-
support for ``enum`` types from the ``PojoCodec`` class. The default
272
-
codec registries, accessible from the ``MongoClientSettings`` and the ``Bson``
273
-
interfaces, now include the ``enum`` codec classes. If your application uses
274
-
a custom enumeration codec and one of the default registries, ensure
275
-
you order them as described in the section on :ref:`overriding codecs <codecs-override>`.
276
-
- Resolved performance issues that impacted versions 4.4 and 4.3 of the
277
-
driver. Performance in this version should be similar to performance in 4.2.
278
-
- Resolved an issue in which errors originating from retrieving the cluster
279
-
description weren't passed to the ``onError`` Subscriber callback
280
-
- Resolved an issue with releasing ``ByteBuf`` instances when you connect
281
-
with compression enabled.
282
-
- Removed an unnecessary dependency on the ``javax.annotation.*`` packages
283
-
from the ``org.mongodb.driver-core`` OSGi bundle.
284
-
285
-
.. _version-4.4:
286
-
287
-
What's New in 4.4
288
-
-----------------
289
-
290
-
New features of the 4.4 Java driver release include:
291
-
292
-
- Compatibility with MongoDB 5.1 and support for Java 17
293
-
- Added support for index hints in an ``AggregateIterable``
294
-
- Added support for the ``$merge`` and ``$out`` aggregation stages on secondaries
295
-
- Use of the ``mergeObjects()`` method in the ``Updates`` builder
296
-
- ``DocumentCodec`` does not ignore a :ref:`CodecRegistry <codecs-codecregistry>` when writing to an ``Iterable`` or a ``Map`` instance
297
-
298
-
.. _version-4.3:
299
-
300
-
What's New in 4.3
301
-
-----------------
302
-
303
-
New features of the 4.3 Java driver release include:
304
-
305
-
- Added support for the MongoDB {+stable-api+}. For more information, see our
306
-
:ref:`{+stable-api+} guide <stable-api-java>`.
307
-
308
-
.. note::
309
-
310
-
Starting from February 2022, the **Versioned API** is known the
311
-
**{+stable-api+}**. All concepts and features remain the same with this
For more information on setup, see our documentation on how to
317
-
:atlas:`Create a New Serverless Instance </tutorial/create-new-serverless-instance/?jmp=docs_driver_java>`
318
-
- Added a builder API for the ``setWindowFields`` pipeline stage to allow the use of window operators
319
-
- Added support for setting Netty `io.netty.handler.ssl.SslContext <https://netty.io/4.1/api/io/netty/handler/ssl/SslContext.html>`__
320
-
- Added support for snapshot reads to ``ClientSession``
321
-
- Limited the rate of establishing new connections per connection pool
322
-
- Removed most restrictions on allowed characters in the field names of documents you insert or replace. This is a behavioral change for any application that is relying on client-side enforcement of these restrictions.
323
-
324
-
The following table shows the restriction status on allowed characters
325
-
in the field names of documents:
326
-
327
-
.. list-table::
328
-
:header-rows: 1
329
-
:stub-columns: 1
330
-
:widths: 15 25 60
331
-
332
-
* - Character
333
-
- Operation
334
-
- Description
335
-
336
-
* - **.**
337
-
- Insert and Replace
338
-
- Removed restrictions on field names containing this character.
339
-
340
-
* - **$**
341
-
- Insert
342
-
- Removed restrictions on field names starting with this character.
343
-
344
-
* - **$**
345
-
- Replace
346
-
- Removed restrictions in nested documents on field names containing this character.
347
-
348
-
* - **$**
349
-
- Replace
350
-
- Kept restrictions in top-level documents on field names starting with this character. This prevents accidental use of a replace operation when the intention was to use an update operation.
351
-
352
-
.. note::
353
-
354
-
Unacknowledged writes using dollar-prefixed or dotted keys may
355
-
be silently rejected by pre-5.0 servers, where some restrictions on
356
-
field names are still enforced in the server.
357
-
358
-
.. _version-4.2:
359
-
360
-
What's New in 4.2
361
-
-----------------
362
-
363
-
.. warning:: Breaking Changes in v4.2
364
-
365
-
The v4.2 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.2>`
366
-
for more information.
367
-
368
-
New features of the 4.2 Java driver release include:
369
-
370
-
- Added Azure and GCP key stores to client-side field level encryption
371
-
- Added Kerberos caching tickets for reuse in multiple authentication requests
372
-
- Added `MongoClients <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-sync/com/mongodb/client/MongoClients.html>`_ instances with ``MongoClientSettings`` or ``ConnectionString`` as the configuration
373
-
- Use of the ``explain()`` method on `find <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-sync/com/mongodb/client/FindIterable.html#explain()>`_ and `aggregate <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-sync/com/mongodb/client/AggregateIterable.html#explain()>`_ commands
374
-
- Added a `JsonObject <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/bson/org/bson/json/JsonObject.html>`_ class to make encoding from and decoding to JSON more efficient by avoiding an intermediate Map representation
375
-
- Added a `BsonRepresentation <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/bson/org/bson/codecs/pojo/annotations/BsonRepresentation.html>`_ annotation that allows you to represent the ``ObjectId`` BSON values as a ``String`` in `POJO <https://en.wikipedia.org/wiki/Plain_old_Java_object>`_ classes
376
-
- Added a `Filters.empty() <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-core/com/mongodb/client/model/Filters.html#empty()>`_ method
377
-
378
-
.. _version-4.1:
379
-
380
-
What's New in 4.1
381
-
-----------------
382
-
383
-
New features of the 4.1 Java driver release include:
384
-
385
-
- Significant reduction in client-perceived failover times during planned maintenance events
386
-
- The `update() <https://mongodb.github.io/mongo-java-driver/4.1/apidocs/mongodb-driver-core/com/mongodb/client/model/UpdateOptions.html#hint(org.bson.conversions.Bson)>`_ and `delete() <https://mongodb.github.io/mongo-java-driver/4.1/apidocs/mongodb-driver-core/com/mongodb/client/model/DeleteOptions.html#hint(org.bson.conversions.Bson)>`_ methods now support index hints
387
-
- The ``find()`` method supports `allowDiskUse() <https://mongodb.github.io/mongo-java-driver/4.1/apidocs/mongodb-driver-sync/com/mongodb/client/FindIterable.html#allowDiskUse(java.lang.Boolean)>`_ for sorts that require too much memory to execute in RAM
388
-
- Added support for the MONGODB-AWS authentication mechanism using Amazon Web Services (AWS) Identity and Access Management (IAM) credentials
389
-
- Authentication requires fewer round trips to the server, resulting in faster connection setup
390
-
391
-
.. _version-4.0:
392
-
393
-
What's New in 4.0
394
-
-----------------
395
-
396
-
.. warning:: Breaking Changes in v4.0
397
-
398
-
The v4.0 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.0>`
0 commit comments