Skip to content

(DOCSP-44283) [Java Sync] update changelogs to remove updates for EOL'd versions v4.9 & earlier #580

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 1 commit into from
Oct 21, 2024
Merged
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
352 changes: 1 addition & 351 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ Learn what's new in:
* :ref:`Version 5.0 <version-5.0>`
* :ref:`Version 4.11 <version-4.11>`
* :ref:`Version 4.10 <version-4.10>`
* :ref:`Version 4.9 <version-4.9>`
* :ref:`Version 4.8 <version-4.8>`
* :ref:`Version 4.7.1 <version-4.7.1>`
* :ref:`Version 4.7.0 <version-4.7.0>`
* :ref:`Version 4.6 <version-4.6>`
* :ref:`Version 4.5.1 <version-4.5.1>`
* :ref:`Version 4.5 <version-4.5>`
* :ref:`Version 4.4 <version-4.4>`
* :ref:`Version 4.3 <version-4.3>`
* :ref:`Version 4.2 <version-4.2>`
* :ref:`Version 4.1 <version-4.1>`
* :ref:`Version 4.0 <version-4.0>`

.. _java-version-5.2:

Expand Down Expand Up @@ -431,342 +419,4 @@ New features of the 4.10 driver release include:
- Support for :ref:`qe-manual-feature-qe` (QE). To learn
more about the requirements for using the QE feature, see the
:ref:`Queryable Encryption Driver Compatibility Table
<qe-compatibility-reference>`.

.. _version-4.9:

What's New in 4.9
-----------------

.. important:: Aggregation Expression Operations Are in Beta

This driver version introduces an API for creating
:ref:`aggregation expressions <java-aggregation-expression-operations>`.
This feature is in beta phase.

New features of the 4.9 driver release include:

- Added a new exception to identify when a constructor annotated by
``BsonCreator`` contains parameters with annotations other than
``BsonProperty`` or ``BsonId``.
- Changed the log message format for command monitoring messages reported
by the ``org.mongodb.driver.protocol.command`` package.
- Added support for the ``$documents`` aggregation pipeline stage to the
`Aggregates <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates#documents(java.util.List)>`__
helper class.
- Added `MongoClientSettings.Builder.applyToLoggerSettings() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyToLoggerSettings(com.mongodb.Block)>`__
and `LoggerSettings.Builder.maxDocumentLength() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/LoggerSettings.Builder.html#maxDocumentLength(int)>`__
methods that let you specify a maximum length for the extended JSON representation of a
BSON document in a log message.

.. _version-4.8:

What's New in 4.8
-----------------

.. warning:: Breaking Changes in v4.8

The v4.8 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.8>`
and :ref:`<java-server-release-change-v4.8>` for more information.

.. important:: Deprecation Notice

The ``MapCodec`` and ``IterableCodec`` classes are deprecated.
Instead of ``MapCodec``, use ``MapCodecProvider``. Instead of ``IterableCodec``,
use ``CollectionCodecProvider``, or ``IterableCodecProvider`` for ``Iterable``
types that aren't ``Collection`` types.

Behavioral changes with the 4.8 driver release include:

- Requirement that you add an explicit dependency on the ``org.bson.codecs.record``
module if your application deploys the driver in an OSGi container and
relies on the driver for encoding and decoding Java records.
- Logging of new connection messages at the ``DEBUG`` level instead
of at ``INFO``.

New features of the 4.8 driver release include:

- Support for authentication with AWS. The driver takes an
optional dependency on both AWS SDK version 1 and version 2.
- Support for obtaining credentials from the environment for both GCP
and Azure for in-use encryption.
- Support for deserialization of records containing components with
generic parameters.
- Support for deserialization of records containing components with more
specific container types, such as ``SortedSet``, ``NavigableMap``, ``LinkedList``,
or ``TreeSet``.
- Support for recursive record types, records whose type
definitions contain cycles.
- Inclusion of the ``disambiguatedPaths`` field in change stream update events
when the ``showExpandedEvents`` server feature is enabled on MongoDB v6.1
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()>`__
API documentation. Learn more about the ``showExpandedEvents`` setting from
the :manual:`Expanded Events </reference/change-events/#expanded-events>`
server documentation.

.. _version-4.7.1:
.. _version-4.7:

What's New in 4.7.1
-------------------

The 4.7.1 driver patches a bug that affects
Client-Side Field Level Encryption and Queryable Encryption.
The bug can cause data corruption when rotating :ref:`Data Encryption Keys <csfle-key-architecture>`
(DEKs) encrypted with a :ref:`Customer Master Key <csfle-key-architecture>`
hosted on Google Cloud Key Management Service or Azure
Key Vault. The bug was present in version 4.7.0 of the driver
in the ``RewrapManyDataKey`` method and causes the
loss of your DEKs.

.. important:: Back Up your Key Vault Collection

Always back up your :ref:`Key Vault Collection <csfle-reference-key-vault>`
before you rotate your DEKs. If you lose your DEKs, you lose access to all
the data encrypted with those keys.

.. _version-4.7.0:

What's New in 4.7
-----------------

.. warning:: Breaking Changes in v4.7

The v4.7 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.7>`
for more information.

New features of the 4.7 driver release include:

- Added full support for MongoDB 6.0.

- Added the following change stream support improvements:

- Enhanced pre-image and post-image support for :ref:`change streams <java-usage-watch>`.
Change stream watch helpers now accept ``whenAvailable`` and ``required``
for the ``fullDocument`` option. See the :manual:`change stream </changeStreams/#change-streams-with-document-pre--and-post-images>`
reference documentation for more information.
- Added a new ``fullDocumentBeforeChange`` option, which accepts
``whenAvailable`` and ``required``.
- Change events now include a ``fullDocumentBeforeChange`` field
when configured for display on your MongoDB collection.
- Added ``showExpandedEvents`` support for change streams.
- Added ``wallTime`` support to the ``ChangeStreamDocument`` class.

- Added :ref:`clustered index <java-clustered-indexes>` creation support.
- Support for new features related to :ref:`qe-manual-feature-qe`,
including support for automatic encryption (MongoDB v6.0 Enterprise or later
is required) and manual encryption.

- Support for the new Queryable Encryption shared library, which removes the need
for the ``mongocryptd`` process. The queryable encryption shared library requires
`org.mongodb:mongodb-crypt <https://mvnrepository.com/artifact/org.mongodb/mongodb-crypt>`__
version ``1.5.1.1`` or later.

- Added a new API for encryption key management.

- Added builder API methods for more aggregation stages
including :pipeline:`$search`/:pipeline:`$searchMeta` (Atlas only),
:pipeline:`$densify`, and :pipeline:`$fill`. Learn more about these
methods on the :ref:`Aggregates Builder <aggregates-builders>` page.

- Added the ``BsonExtraElements`` annotation that can be used with POJO encoding
and decoding. ``BsonExtraElements`` enables decoding objects that might receive
new fields in the future without requiring developers to explicitly map
those new fields.

- Performance optimizations including:

- Lock-free implementations of the server session pool and the buffer pool.
- A new cleanup implementation of ``DBCursor`` that uses Java's
Cleaner API instead of finalization, available in Java 9 or later.

- The :ref:`setWindowFields <builders-aggregates-setWindowFields>` builder API
is no longer a beta feature. Changes in the API break both binary and source
compatibility. See :ref:`<java-breaking-changes-v4.7>` for more information.

.. _version-4.6:

What's New in 4.6
-----------------

New features of the 4.6 Java driver release include:

- The buffer pool is now shared across all ``MongoClient`` instances. The
buffer pool prunes buffers that have been idle for one minute.
- Added an API to specify suppliers for AWS KMS credentials for
Client-Side Field Level Encryption (CSFLE). See the
`AutoEncryptionSettings.Builder.kmsProviderPropertySuppliers() <https://mongodb.github.io/mongo-java-driver/4.6/apidocs/mongodb-driver-core/com/mongodb/AutoEncryptionSettings.Builder.html#kmsProviderPropertySuppliers(java.util.Map)>`__
and the `ClientEncryptionSettings.Builder.kmsProviderPropertySuppliers() <https://mongodb.github.io/mongo-java-driver/4.6/apidocs/mongodb-driver-core/com/mongodb/ClientEncryptionSettings.html#getKmsProviderPropertySuppliers()>`__
API documentation for more information.
- Added compatibility to ``org.mongodb:mongodb-crypt``, a dependency for
CSFLE, for Apple M1 ARM-based hardware.
- Added a service provider interface (SPI) to allow the driver to specify
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>`__
and the `DnsClientProvider <https://mongodb.github.io/mongo-java-driver/4.6/apidocs/mongodb-driver-core/com/mongodb/spi/dns/DnsClientProvider.html>`__
interface API documentation for more information.
- Added driver support for encoding and decoding between `Java records <https://docs.oracle.com/en/java/javase/17/language/records.html>`__
and BSON documents, which is enabled by default. See :ref:`<fundamentals-records>`
for more information.

.. _version-4.5:
.. _version-4.5.1:

What's New in 4.5.1
-------------------

If the DNS server returns an NXDomain error,
indicating a non-existent domain, the 4.5.1
driver no longer throws an exception.

.. _version-4.5.0:

What's New in 4.5
-----------------

New features of the 4.5 Java driver release include:

- Added support for specifying custom service names of SRV resource
records. See the ``srvServiceName`` setting in the :ref:`Connection
Options <connection-options>` guide for more information.
- Added support to customize UUID representation in a codec registry using
the ``CodecRegistries.withUuidRepresentation()`` method.
- Added support for overriding listener settings in ``ClusterSettings``,
``ServerSettings`` and ``ConnectionPoolSettings`` builders.
- All events received by ``ClusterListener``, ``ServerListener``, and
``ServerMonitorListener`` are now totally ordered using
a happens-before relationship when the listeners are not shared by
different MongoClient instances. To learn more about the happens-before
ordering, see `Happens-before Order <https://docs.oracle.com/javase/specs/jls/se17/html/jls-17.html#jls-17.4.5>`__
in the Java Language Specification.
- Added ``EnumCodec`` and ``EnumCodecProvider`` classes to separate codec
support for ``enum`` types from the ``PojoCodec`` class. The default
codec registries, which you can access from the ``MongoClientSettings`` and the ``Bson``
interfaces, now include the ``enum`` codec classes. If your application uses
a custom enumeration codec and one of the default registries, ensure
you order them as described in the section on :ref:`overriding codecs <codecs-override>`.
- Resolved performance issues that impacted versions 4.4 and 4.3 of the
driver. Performance in this version is similar to performance in 4.2.
- Resolved an issue in which errors originating from retrieving the cluster
description weren't passed to the ``onError`` Subscriber callback
- Resolved an issue with releasing ``ByteBuf`` instances when you connect
with compression enabled.
- Removed an unnecessary dependency on the ``javax.annotation.*`` packages
from the ``org.mongodb.driver-core`` OSGi bundle.

.. _version-4.4:

What's New in 4.4
-----------------

New features of the 4.4 Java driver release include:

- Compatibility with MongoDB 5.1 and support for Java 17
- Added support for index hints in an ``AggregateIterable``
- Added support for the ``$merge`` and ``$out`` aggregation stages on secondaries
- Use of the ``mergeObjects()`` method in the ``Updates`` builder
- ``DocumentCodec`` does not ignore a :ref:`CodecRegistry <codecs-codecregistry>` when writing to an ``Iterable`` or a ``Map`` instance

.. _version-4.3:

What's New in 4.3
-----------------

New features of the 4.3 Java driver release include:

- Added support for the MongoDB {+stable-api+}. For more information, see our
:ref:`{+stable-api+} guide <stable-api-java>`.

.. note::

Starting from February 2022, the **Versioned API** is known the
**{+stable-api+}**. All concepts and features remain the same with this
naming change.

- Added support for connection to
`MongoDB Atlas Serverless Instances <https://www.mongodb.com/use-cases/serverless>`__.
For more information about setup, see our documentation on how to
:atlas:`Create a New Serverless Instance </tutorial/create-new-serverless-instance/?jmp=docs_driver_java>`
- Added a builder API for the ``setWindowFields`` pipeline stage to allow the use of window operators
- Added support for setting Netty `io.netty.handler.ssl.SslContext <https://netty.io/4.1/api/io/netty/handler/ssl/SslContext.html>`__
- Added support for snapshot reads to ``ClientSession``
- Limited the rate of establishing new connections per connection pool
- 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.

The following table shows the restriction status on allowed characters
in the field names of documents:

.. list-table::
:header-rows: 1
:stub-columns: 1
:widths: 15 25 60

* - Character
- Operation
- Description

* - **.**
- Insert and Replace
- Removed restrictions on field names containing this character.

* - **$**
- Insert
- Removed restrictions on field names starting with this character.

* - **$**
- Replace
- Removed restrictions in nested documents on field names containing this character.

* - **$**
- Replace
- 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.

.. note::

Unacknowledged writes using dollar-prefixed or dotted keys might
be silently rejected by pre-5.0 servers, where some restrictions on
field names are still enforced in the server.

.. _version-4.2:

What's New in 4.2
-----------------

.. warning:: Breaking Changes in v4.2

The v4.2 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.2>`
for more information.

New features of the 4.2 Java driver release include:

- Added Azure and GCP key stores to client-side field level encryption
- Added Kerberos caching tickets for reuse in multiple authentication requests
- 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
- 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
- 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
- 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
- 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

.. _version-4.1:

What's New in 4.1
-----------------

New features of the 4.1 Java driver release include:

- Significant reduction in client-perceived failover times during planned maintenance events
- 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
- 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
- Added support for the MONGODB-AWS authentication mechanism using Amazon Web Services (AWS) Identity and Access Management (IAM) credentials
- Authentication requires fewer round trips to the server, resulting in faster connection setup

.. _version-4.0:

What's New in 4.0
-----------------

.. warning:: Breaking Changes in v4.0

The v4.0 driver contains breaking changes. See :ref:`<java-breaking-changes-v4.0>`
for more information.

This release adds no new features.
<qe-compatibility-reference>`.
Loading