Skip to content

Releases: mongodb/mongo-java-driver

Java Driver 5.5.0 (May 07, 2025)

07 May 16:21
Compare
Choose a tag to compare

What's Changed

🚀 New Features and Improvements

  • Credential Handling:

    • Added option to configure Data Encryption Key (DEK) cache lifetime (#1689).
  • Performance Optimizations:

    • Enhanced BSON codec lookup (#1632).
    • Optimized BSON decoding (#1667).
    • Reduced temporary buffer allocations during BSON serialization (#1628).
    • Optimized numeric value writing (#1635).
    • Improved String write and length computations (#1651, #1685).
    • Enhanced buffer handling to avoid direct list access (#1675).
    • Replaced Stack with ArrayDeque for better performance (#1681).
  • Resource Management:

    • Fixed Netty event loop resource leak on MongoClient close (#1646).
    • Added connection timeout to TLS Channel (#1686).
  • Compatibility and Maintenance:

    • Dropped support for MongoDB 4.0 (#1663).
    • Updated AWS SDK dependencies to the latest versions (#1639).
    • Replaced org.jetbrains.annotations.NotNull with com.mongodb.lang.NonNull (#1644).
  • Benchmarks and Testing:

    • Introduced Netty benchmark suite (#1647).
    • Added benchmarks for BulkWrite operations (#1657).
    • Began running benchmarks against MongoDB 8.0 (#1660).
  • Bug Fixes and Stability:

    • Made ReadConcernMajorityNotAvailableYet retryable (#1601).
    • Ensured findOne does not unnecessarily set batchSize=1 (#1659).
    • Fixed unnecessary killCursors command when batchSize equals limit (#1656).
  • Documentation and Quality of Life:

    • Improved documentation around the toCollection API (#1677).
    • Updated specification links and submodule management (#1662, #1670).
    • Added Dependabot support for Git submodules (#1691).
  • Kotlin Improvements:

    • Configurable BSON naming strategy to support snake_case (#1627).
    • Add Kotlin Extensions to BOM #1668
    • JAVA-5776 Make KProperty.path() public (#1617)

🧪 Test Enhancements

  • Added IPv6 literal testing in SDAM (#1648).
  • Introduced additional regression and CRUD operation tests (#1692, #1687).
  • Improved testing strategy for flaky unified tests (#1565).

🛠️ Infrastructure Improvements

  • Modernized Gradle build processes and ensured Maven artifacts are properly signed (#1654, #1709).
  • Improved performance test configuration and resource allocation (#1676).

Other Changes

  • Split atlas-deployed-task-group across multiple hosts (#1640)
  • Fix driver-lambda evg failure (#1643)
  • Test Load balancers (#1649)
  • Adjust maxAwaitTimeMS by remaining timeout. (#1650)
  • Deprecate read preference hedge options (#1655)
  • Fix scalac warning (#1666)
  • Record both FaaS and container metadata when both are present (#1661)
  • Add String cache for BsonArray indexes. (#1664)
  • Optimize BsonArray Index encoding (#1673)
  • Fix ByteBufferBsonOutput buffer caching logic. (#1683)
  • Fix the cold Publisher link in the API documentation (#1678)
  • Ignore collectionUUID field if present in change stream tests (#1684)
  • Updated the bom validation to ensure it runs. (#1671)
  • Specifications. (#1690)
  • Reenable clientside-operations-timeout apply maxAwaitTimeMS if less than remaining timeout test (#1693)
  • Update ClientEncryptionCustomEndpointTest (#1694)
  • Skip test for latest (#1700)
  • Added extra test to ignore for reactive streams (#1699)
  • Add non compliance skip for Atlas Data Lake getMore test (#1701)
  • Enable test of nsType with a collection view (#1702)
  • Fix static check warnings. (#1696)
  • Add missing Javadoc. (#1697)
  • DEVPROD-16438 - migrate perf.send to cedar_report endpoint (#1679)
  • Fix validation in release.yml (#1706)

👏 New Contributors

Welcome and thank you to our new contributors:

We appreciate all contributions to the MongoDB Java Driver—thank you!

Full Changelog:(r5.4.0-alpha0...r5.5.0)

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.4/security/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.4.0 (March 20, 2025)

26 Mar 17:07
Compare
Choose a tag to compare

What's Changed

🚀 New Features & Enhancements

  • JAVA-5767 Support $lookup in CSFLE and QE #1638
  • Improved selection criteria for srvMaxHosts. #1590
  • Add index hint support for distinct command #1581

Atlas Search Improvements

Bulk Write and Update Enhancements

  • Improved Bulk Write API and added sort option support to updateOne and replaceOne. #1509, #1585, #1612
  • Added Scala Client Bulk Write API. #1603

Driver and Codec Optimizations

  • Optimized BSON codec lookup. #1632
  • Optimized ObjectID sorting and serialization/deserialization. #1582

Client and Connection Handling

  • Updated cursors to refresh timeoutMS on close without affecting operation timeout. #1527
  • Added AsyncTransportSettings and ExecutorService. #1489
  • Ensured connections are not closed prematurely when timeoutMS expires before sending requests. #1573
  • Removed explicit fairness from DefaultConnectionPool. #1575

Cloud and Security Improvements

  • Added OIDC Kubernetes provider support. #1576
  • Updated AWS SDK dependencies. #1639

Kotlin Updates

  • Merging feature branch (Kotlin extensions) into main #1572
  • JAVA-5776 Make KProperty.path() public #1617
  • JAVA-5736 Add bsonNamingStrategy option to support snake_case #1627

🛠 Maintenance and Improvements

  • Renamed Vector class names and marked PackedBitVector as Beta. #1595, #1594
  • Improved handling and initialization of CAPI and jna.Native. #1553
  • Updated Gradle scripts and build configurations. #1620, #1624, #1607, #1569
  • Replaced JetBrains annotations with MongoDB annotations. #1644
  • Stop using the kotlinCheck Gradle task from ssdlc-report.sh #1574

Testing and CI Improvements

  • Clarified and cleaned up internal testing APIs (TestDef). #1566, #1578
  • Enhanced unified test skipping and handling logic. #1557, #1551, #1584
  • Added integration tests for Atlas Search and Load Balancers. #1616, #1649
  • Improved test cleanup and retry logic to reduce flakiness. #1608, #1565

Specification Syncing and Updates

  • Synced BSON and server selection specification tests. #1555, #1554
  • Synced non-lb-connection-establishment. #1634

🐞 Bug & Test Fixes

  • Stop ignoring id parameter #1622
  • Fixed static checker warnings and deprecation warnings. #1564, #1613, #1633
  • Resolved unintended sync test skipping. #1600
  • Fixed module naming for Kotlin extensions. #1602
  • Fixed integration test issues for Regex and Wildcard operators. #1611
  • Update pool-checkout-returned-connection-maxConnecting.json to work with different pool implementations #1563
  • Add flaky annotation to flaky tests #1558
  • Remove deprecated field from GridFS unified tests #1577
  • Fix driver-lambda evg failure #1643
  • Test IPv6 literal in SDAM #1648
  • Split atlas-deployed-task-group across multiple hosts #1640
  • Change branch name to main in SSDLC script. #1552
  • Add @SuppressWarnings("try") to CommandBatchCursorTest, AsyncCommandBatchCursorTest #1567
  • JAVA-5781 Add env var override #1623
  • Evergreen: Update to use stop-orchestration.sh #1621

🌟 Community Contributions

New Contributors:

We appreciate all contributions to the MongoDB Java Driver—thank you!

Full Changelog: r5.3.1...r5.4.0

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.3/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.4.0-alpha0 (February 27, 2025)

27 Feb 22:54
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: r5.3.0-beta0...r5.4.0-alpha0

Java Driver 5.3.1 (January 23, 2025)

23 Jan 11:35
Compare
Choose a tag to compare

What's Changed

Full Changelog: r5.3.0...r5.3.1

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.3/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.3.0 (January 10, 2025)

21 Jan 14:13
Compare
Choose a tag to compare

Important

A future minor release will raise the minimum supported MongoDB Server version from 4.0 to 4.2. This is in accordance with MongoDB Software Lifecycle Schedules. Support for MongoDB Server 4.0 will be dropped in a future release!

What's Changed

  • Make CAPI, jna.Native/Structure initializable at run time by @stIncMale in #1553
  • Clean up unified tests via skipping API by @katcharov in #1551
  • Sync BSON specification tests by @jyemin in #1555
  • Sync server selection specification tests by @jyemin in #1554
  • Update pool-checkout-returned-connection-maxConnecting.json to work with different pool implementations by @stIncMale in #1563
  • Fix static checker warnings in AggregatesSpecification.groovy by @stIncMale in #1564
  • Change branch name to main in SSDLC script. by @vbabanin in #1552
  • Add flaky annotation to flaky tests by @katcharov in #1558
  • Move most skips to single file, expand API to handle conditions by @katcharov in #1557
  • Update cursors to refresh timeoutMS on close without affecting the timeout of the operation by @stIncMale in #1527
  • Add AsyncTransportSettings, ExecutorService by @katcharov in #1489
  • Add @SuppressWarnings("try") to CommandBatchCursorTest, AsyncCommandBatchCursorTest by @stIncMale in #1567
  • Clean up TestDef API, clarify naming by @katcharov in #1566
  • Merging feature branch (Kotlin extensions) into main by @nhachicha in #1572
  • Stop using the kotlinCheck Gradle task from ssdlc-report.sh by @stIncMale in #1574
  • Remove explicit fairness from DefaultConnectionPool by @stIncMale in #1575
  • Make sure TestDef is created and used only when there is enough data to do that by @stIncMale in #1578
  • Connections must not be closed when timeoutMS expires before sending a request by @stIncMale in #1573
  • Remove deprecated field from GridFS unified tests by @joykim1005 in #1577
  • Add index hint support for distinct command by @joykim1005 in #1581
  • Provide the reason for the test skips. by @vbabanin in #1584
  • Rename Vector class names. by @vbabanin in #1595
  • Allow updateOne and replaceOne to supply sort option by @joykim1005 in #1585
  • Mark PackedBitVector as Beta, aligning with binary quantization preview by @vbabanin in #1594
  • Improved Bulk Write API by @stIncMale in #1509
  • Resolve unintended sync test skipping. by @vbabanin in #1600

New Contributors

Full Changelog: r5.3.0-beta0...r5.3.0

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.3/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 5.2.1 (November 06, 2024)

15 Nov 14:28
Compare
Choose a tag to compare

What's Changed

  • Exclude com.oracle.svm.core.annotate from Import-Package for OSGi by @stIncMale in #1520
  • Make CAPI, jna.Native/Structure initializable at run time (#1553) by @stIncMale in #1556
  • Ensure kotlinx.datetime.LocalTime exists before adding the serializer (Backport #1530 by @katcharov in #1559)

Full Changelog: r5.2.0...r5.2.1

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.2/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 4.11.5 (November 06, 2024)

15 Nov 14:29
Compare
Choose a tag to compare

What's Changed

Full Changelog: r4.11.4...r4.11.5

Java Driver 5.3.0-beta0 (October 31, 2024)

01 Nov 21:23
Compare
Choose a tag to compare

What's Changed

Full Changelog: r5.2.0...r5.3.0-beta0

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.2/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver v5.2.0 (September 24, 2024)

26 Sep 14:34
e34283d
Compare
Choose a tag to compare

What's Changed

Full Changelog: r5.1.0...r5.2.0

New Features

Improvements

  • Enhance KotlinSerializer with value codecs for widening primitive conversion. by @vbabanin in #1301
  • Extend Socks5 Top-Level Domain regex validation to support up to 63 characters by @vbabanin in #1427
  • Performance improvements for GridFS by @vbabanin in #1402
  • Direct retries to another mongos if one is available by @stIncMale in #1367
  • Improve SecureRandom usage in ObjectId by @stIncMale in #1394
  • Augment config/spotbugs/exclude.xml with finding status and rank by @stIncMale in #1392
  • Create and upload ssdlc_compliance_report.md by @stIncMale in #1405
  • Disallow comma character in authMechanismProperties by @katcharov in #1408
  • Forward slash in connection string is optional by @jyemin in #1420 and #1421
  • Add GitHub Actions based release automation by @alcaeus in #1400 and #1437 and #1425
  • Use Java Cryptographic Architecture provider for implementation of PBKDF2 by @jyemin in #1448
  • Update Kotlin metadata to include Kotlin language version by @rozza in #1461
  • Added Bson-Kotlin Array Codec by @rozza in #1457
  • Added kotlinx.json JsonElement serialization support by @rozza in #1459

Bug Fixes

  • Revert making BsonEncoder / BsonDecoder internal by @rozza in #1510
  • Remove host and port from IllegalArgumentException thrown by malformed connection string by @rozza in #1467
  • Allow generic base classes for POJOs by @jyemin in #1423
  • Fix to identify and match type arguments, including optional generic types in DataClassCodec#getCodec by @ht-jo in #1339
  • Fix OSGi :mongodb-crypt manifest entries by @stIncMale in #1506
  • Fix scaladoc warnings by @stIncMale in #1507
  • Fix :mongodb-crypt GraalVM metadata by @stIncMale in #1508
  • Fix release workflow by @alcaeus in #1422
  • Fix encoding nullable generics by @cliffred in #1317
  • Fix CursorResourceManager.close by @stIncMale in #1440
  • Fix bson-kotlinx encodeNullableSerializableValue null handling by @rozza in #1453
  • Ensure Sink.contextView is propagated by @rozza in #1450
  • Ensure exception propagation in async try-catch block. by @vbabanin in #1466
  • MixedBulkWriteOperation should generate inserted document IDs at most once per batch by @stIncMale in #1482
  • Fix exception propagation in Async API methods by @vbabanin in #1479

Other Notable Changes and Upgrades

New Contributors

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.2/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8

Java Driver 4.11.4 (September 05, 2024)

06 Sep 13:37
Compare
Choose a tag to compare

What's Changed

Full Changelog: r4.11.3...r4.11.4

Verifying artifact signatures

Please refer to https://www.mongodb.com/docs/drivers/java/sync/v5.1/validate-signatures/ for the full procedure.

To download and import the public key for verifying signatures, execute

gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 1a75005e142192223d6a7c3b76e0008d166740a8