-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement splitting and encoding ops
, nsInfo
as separate OP_MSG
sections, implement prose tests
#1495
Merged
stIncMale
merged 104 commits into
mongodb:JAVA-4586_bulk-write
from
stIncMale:JAVA-5529
Nov 27, 2024
Merged
Implement splitting and encoding ops
, nsInfo
as separate OP_MSG
sections, implement prose tests
#1495
Changes from all commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
48b9614
Create and document Java sync improved bulk write API
stIncMale af854ed
Remove the type parameter from `ClientWriteModel`
stIncMale 1eb7466
Remove `ClientBulkWriteException.create` as we can get by with the co…
stIncMale 5567324
Merge branch 'master' into JAVA-5527
stIncMale 644d561
Merge branch 'master' into JAVA-5527
stIncMale f566303
Do minor improvements
stIncMale 3d13ffd
Make changes needed for the implementation
stIncMale cf46b46
Fix formatting in ClientUpdateManyModel
stIncMale e049234
Make a few minor changes
stIncMale 0e16427
Merge branch 'master' into JAVA-5527
stIncMale 0d518d8
Add more info to the API docs, add `ClientWriteModel` subtypes
stIncMale 6b77f78
Add `ClientWriteModelWithNamespace`
stIncMale 2ed8e87
Implement
stIncMale 07bac95
Sync spec tests
stIncMale 16f100b
Implement required test runner changes
stIncMale 9f8ce2c
Improve how `indexedNamespaces` are computed
stIncMale fdb90d2
Remove `throws` declarations from the API
stIncMale 39386fe
Make wording on `ClientWriteModel` methods consistent with that on `C…
stIncMale f67af3f
Move constructor methods to `ClientNamespacedWriteModel`
stIncMale 53f6883
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 9a7b668
Fix errors caused by the merge
stIncMale 395af7a
Use `Optional` to express verbose/summary results
stIncMale 8f504b0
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale b02a638
Fix errors caused by the merge
stIncMale a11e5f6
Make an API doc improvement
stIncMale bfbc1cc
Refactor `shouldAttemptToRetryWriteAndAddRetryableLabel`
stIncMale 1c3c590
Improve `CrudProseTest.insertMustGenerateIdAtMostOnce`
stIncMale 1c9c19e
Move `MixedBulkWriteOperation.validateAndGetEffectiveWriteConcern`/`c…
stIncMale 061e605
Add a comment in `toClientNamespacedWriteModel`
stIncMale 8320216
Use `CommandResultDocumentCodec` in `ClientBulkWriteOperation`
stIncMale f41ed59
Use `Integer` for indexes in `ClientBulkWriteResult.Verbose`. Make `C…
stIncMale 4846e0b
Use `Integer` for indexes in `ClientBulkWriteException`.
stIncMale dbf9a26
Take `ClientBulkWriteException` into account in `OperationExecutor.ex…
stIncMale a0005cd
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 35eee96
Fixes after the merge
stIncMale 21bb22e
Make `ClientInsertOneResult.getInsertedId` return `Optional`
stIncMale 182b2f9
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale fb32fde
Fixes after the merge
stIncMale f026ee3
Update the documentation of `ClientBulkWriteException` and remove a TODO
stIncMale 7372f13
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 0fb65d4
Synchronize unified tests with https://github.com/mongodb/specificati…
stIncMale e36898f
Refactor `CrudProseTest` to support the reactive client
stIncMale 70bb422
Add methods for all prose tests. Where possible, implement them
stIncMale 3584de5
Move results to `com.mongodb.client.model.bulk`
stIncMale 5a17ea0
Merge branch 'master' into JAVA-5527
stIncMale 8e1d770
Move internal results to `com.mongodb.internal.client.model.bulk`
stIncMale e973615
Document that `bulkWrite` is not supported by serverless instances
stIncMale 33ec764
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale ee893f2
Fixes after the merge
stIncMale e33f592
Add subtypes of `ClientNamespacedWriteModel` and hide `ClientWriteModel`
stIncMale f94ad58
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 310426a
Fixes after the merge
stIncMale 301a2ba
Remove a garbage comment
stIncMale 1a57fb6
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 6f01e61
Replace `ConcreteClientNamespacedWriteModel` with multiple more speci…
stIncMale c3224e9
Rearrange `ClientWriteModel` inheritance: "one" should extend "many",…
stIncMale c057390
Make internal `AbstractClientNamespacedWriteModel` public
stIncMale dbb6ec8
Rearrange `ClientWriteModel` inheritance: neither "one" nor "many" sh…
stIncMale cb11c44
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 8bd7a6a
Fixes after the merge
stIncMale f781bca
Make internal `AbstractClientUpdateModel`, `AbstractClientDeleteModel…
stIncMale ec88c02
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 1d4a1d3
Implement branching in `ByteBufferBsonOutput` and use this type expli…
stIncMale 14bb86e
Improve code comments in `ClientBulkWriteOperation`
stIncMale 2127031
Introduce `OpMsgSequences` that encompasses `SplittablePayload`
stIncMale bcbde1e
Implement batching, limit checking, retryability per batch
stIncMale fcbfe08
Implement prose tests
stIncMale 752fcbe
Merge branch 'JAVA-5528' into JAVA-5529
stIncMale 764d7de
Address code walkthrough concerns
stIncMale f186b31
Fix `server-selection/logging/operation-id.json:Failed client bulkWri…
stIncMale 3442a73
Rename an incorrectly named variable
stIncMale ffd4f75
Assert that `CryptConnection` observes only either `ValidatableSplitt…
stIncMale 3fc86bb
Stop linking to `Filters` from the documentation of `ClientNamespaced…
stIncMale f9c960c
Merge branch 'JAVA-5528' into JAVA-5529
stIncMale 86e5234
Update driver-core/src/main/com/mongodb/client/model/bulk/ClientBulkW…
stIncMale fb134f8
Update driver-core/src/main/com/mongodb/client/model/bulk/ClientDelet…
stIncMale a4bf4d0
Fix typos in API docs
stIncMale 2837235
Change code to always refer to `ClientBulkWriteResult.Verbose` with t…
stIncMale b6702a6
Rename `ClientBulkWriteResult.Verbose` to `ClientBulkWriteResult.Verb…
stIncMale 24ce6db
Improve partial result API documentation wording
stIncMale ca5d19a
Merge branch 'JAVA-5527' into JAVA-5528
stIncMale 6d8a3e6
Fixes after the merge
stIncMale 076d39a
Merge branch 'master' into JAVA-5528
stIncMale 6b2b7a8
Merge branch 'JAVA-4586_bulk-write' into JAVA-5528
stIncMale 96733a7
Merge branch 'JAVA-5528' into JAVA-5529
stIncMale 8bda529
Fixes after the merge
stIncMale 11653f0
Merge branch 'JAVA-4586_bulk-write' into JAVA-5529
stIncMale 8d545ff
Fix logic for determining whether to populate `ClientBulkWriteExcepti…
stIncMale e2aaa2a
Update `client-bulkWrite-partialResults.json` to match the specification
stIncMale 52bb622
Fix how `ClientBulkWriteOperation.ClientBulkWriteCommand.OpsAndNsInfo…
stIncMale 70fd9f1
Make the changes needed for tests to pass despite async/Kotlin APIs n…
stIncMale 038fafa
Add a DRIVERS-2997 workaround to `AbstractClientSideOperationsTimeout…
stIncMale f430b7e
Double the timeouts in `AbstractClientSideOperationsTimeoutProseTest.…
stIncMale cf175d4
Make the changes needed in `UnifiedTest` for tests to pass despite as…
stIncMale ea0633e
Replace lazy command document with non-lazy one
stIncMale 9fe35e4
Create `DualMessageSequences` abstraction
stIncMale 056d411
Get rid of `OrdinaryAndStoredBsonWriters`
stIncMale 6f68c0e
Add `CommandMessageTest.getCommandDocumentFromClientBulkWrite`
stIncMale ee3073e
Remove the BSON document size validation requirement for the client b…
stIncMale 0e78b67
Update driver-core/src/main/com/mongodb/internal/connection/CommandMe…
stIncMale 38c880d
Address simple review concerns
stIncMale 0156135
Extract `writeOpMsg`, `writeOpQuery` from `CommandMessage.encodeMessa…
stIncMale f07ff6f
Refactor `CommandMessage`
stIncMale 3c6c09f
Refactor `BsonWriterHelper.appendElementsToDocument`
stIncMale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this limitation apply only to
client bulk write
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if limitation is the right word here. But yes, this is unique to client bulk writes:
extraElements
before encoding thePAYLOAD_TYPE_1_DOCUMENT_SEQUENCE
section. Thus, when we are encoding the document sequence, we know exactly how much space we have left available before reachingMessageSettings.getMaxMessageSize
.PAYLOAD_TYPE_1_DOCUMENT_SEQUENCE
sections. That is, we may need to write something after writing those sections. That, in turn, means we can't know exactly how much space we have left when we encode document sequences. But whatever we write after writing the sequences, its size is bounded, and 1000 bytes is used in the spec as the value that is definitely not smaller than that bound.