-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: mongodb/mongo-java-driver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: mongodb/mongo-java-driver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ByteBuf
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 74 files changed
- 7 contributors
Commits on Feb 25, 2026
-
ByteBufBsonDocument & ByteBufBsonArray refactorings (#1874)
* ByteBufBsonDocument & ByteBufBsonArray refactoring * Now implement `Closeable` to track and manage lifecycle with try-with-resources * `ByteBufBsonDocument`: Added resource tracking, OP_MSG parsing, caching strategy * `ByteBufBsonArray`: Added resource tracking and cleanup CommandMessage Changes: * `getCommandDocument()` returns `ByteBufBsonDocument` (was `BsonDocument`) * Delegates document composition to `ByteBufBsonDocument` * Simplified `OP_MSG` document sequence parsing JAVA-6010 * Nit fixes and usability improvements If the document is hydrated allow continued use after resource closing. * PR updates * PR updates - ensure iterators track open resources and normalize the tests
Configuration menu - View commit details
-
Copy full SHA for 98a264b - Browse repository at this point
Copy the full SHA 98a264bView commit details
Commits on Mar 10, 2026
-
ByteBufBsonDocumentandRawBsonDocumentsimplifications (#1902)### Rationale `ByteBufBsonDocument#clone` used to return a `RawBsonDocument`. The recent changes returned a normal `BsonDocument`, which is potentially expensive depending on its usage. The `ByteBufBsonDocument` changes also added complex iterator logic, when `RawBsonDocument` deferred to `BsonDocument` iterators. As iteration is essentially a hydrating mechanism, there is opportunity for improvements for both implementations. By changing the `RawBsonDocument` iterators to be more efficient, `ByteBufBsonDocument` can now utilize these efficiency gains by proxy, relying on the `cachedDocument` iterators. This change both reduces the complexity of `ByteBufBsonDocument` and relies on an improved `RawBsonDocument` implementation. ### Summary of changes * **`ByteBufBsonDocument`**: * Simplify by returning `RawBsonDocument` from `toBsonDocument`, avoiding full BSON deserialization. When there are no sequence fields, the body bytes are cloned directly. When sequence fields exist, `BsonBinaryWriter.pipe()` merges the body with sequence arrays efficiently. * Use `toBsonDocument` for iterators. This eliminates the need for custom iterators (`IteratorMode`, `CombinedIterator`, `createBodyIterator`, and sequence iterators) since `entrySet`/`values`/`keySet` now delegate to the cached `RawBsonDocument`. * **`RawBsonDocument`**: * Renamed `toBaseBsonDocument` to override the default `toBsonDocument` implementation. * Implemented the iterators so that they don't need to fully convert the document to a `BsonDocument`. * **Tests**: * Updated `ByteBufBsonDocumentTest` iteration tests. * Updated `ByteBufBsonArrayTest#fromValues` as `entrySet` now returns `RawBsonDocument` instances. JAVA-6010 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>Configuration menu - View commit details
-
Copy full SHA for 945bdd7 - Browse repository at this point
Copy the full SHA 945bdd7View commit details
Commits on Mar 24, 2026
-
Merge main into ByteBuf (#1907)
* Revert NettyByteBuf.asReadOnly change (#1871) Originally introduced in 057649f This change had the unintended side effect of leaking netty ByteBufs when logging. JAVA-5982 * Update Netty dependency to the latest version. (#1867) JAVA-5818 * Adjust timeout handling in client-side operations to account for RTT variations (#1793) JAVA-5375 --------- Co-authored-by: Ross Lawley <ross@mongodb.com> * Update Snappy version for the latest security fixes. (#1868) JAVA-6069 * Bson javadoc improvements (#1883) Fixed no comment warning in BinaryVector Improved BsonBinary asUuid documentation Improved BsonBinarySubType isUuid documentation JAVA-6086 * Make NettyByteBuf share parent reference count. (#1891) JAVA-6107 * JAVA-5907 (#1893) * JAVA-5907 * JAVA-5907 use execute within executor service If we don't use the return value from executor then we should use `execute` instead of `submit` * format * revert error log for netty leak --------- Co-authored-by: Almas Abdrazak <abdrazak.almas@mongodb.com> * Fix RawBsonDocument encoding performance regression (#1888) Add instanceof check in BsonDocumentCodec to route RawBsonDocument to RawBsonDocumentCodec, restoring efficient byte-copy encoding. Previous BsonType-based lookup led to sub-optimal performance as it could not distinguish RawBsonDocument from BsonDocument. JAVA-6101 * Update specifications to latest (#1884) JAVA-6092 * Evergreen atlas search fix (#1894) Update evergreen atlas-deployed-task-group configuration Assume test secrets and follow the driver-evergreen-tools atlas recommended usage: https://github.com/mongodb-labs/drivers-evergreen-tools/tree/master/.evergreen/atlas#usage JAVA-6103 * [JAVA-6028] Add Micrometer/OpenTelemetry tracing support to the reactive-streams (#1898) * Add Micrometer/OpenTelemetry tracing support to the reactive-streams driver https://jira.mongodb.org/browse/JAVA-6028 Port the tracing infrastructure from the sync driver to driver-reactive-streams, reusing the existing driver-core, TracingManager, Span, and TraceContext classes. * Move error handling and span lifecycle (span.error(), span.end()) from Reactor's doOnError/doFinally operators into the async callback, before emitting the result to the subscriber. * Making sure span is properly closed when an exception occurs * Clone command event document before storing to prevent use-after-free. (#1901) * Version: bump 5.7.0-beta1 * Version: bump 5.7.0-SNAPSHOT * Remove unneeded variable --------- Co-authored-by: Viacheslav Babanin <slav.babanin@mongodb.com> Co-authored-by: Almas Abdrazak <almas337519@gmail.com> Co-authored-by: Almas Abdrazak <abdrazak.almas@mongodb.com> Co-authored-by: Nabil Hachicha <nabil.hachicha@mongodb.com> Co-authored-by: Nabil Hachicha <1793238+nhachicha@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f91b10e - Browse repository at this point
Copy the full SHA f91b10eView commit details -
- Ensure Default Server Monitor calls close on resources before interrupt - Update ByteBufferBsonOutput documentation - Improve ReplyHeader testing and ensure resources are closed - Improve ServerSessionPool testing - Ensure reactive client session closing is idempotent - Added System.gc to unified test cleanup. Should cause more gc when testing. JAVA-6081
Configuration menu - View commit details
-
Copy full SHA for 8711eef - Browse repository at this point
Copy the full SHA 8711eefView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...ByteBuf