Skip to content
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

DRIVERS-2968 Relax index type requirements in bulk write spec #1661

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

isabelatkinson
Copy link
Contributor

Please complete the following before merging:

  • Update changelog.
  • Make sure there are generated JSON files from the YAML test files.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded
    clusters, and serverless).

@isabelatkinson isabelatkinson marked this pull request as ready for review September 18, 2024 17:28
@isabelatkinson isabelatkinson requested a review from a team as a code owner September 18, 2024 17:28
@isabelatkinson isabelatkinson requested review from nbbeeken, kevinAlbs and stIncMale and removed request for a team and nbbeeken September 18, 2024 17:28
@isabelatkinson isabelatkinson merged commit 0615167 into mongodb:master Sep 18, 2024
4 checks passed
The `insertResults`, `updateResults`, and `deleteResults` maps in `BulkWriteResult` and the `writeErrors` map in
`BulkWriteException` specify `Index` as their key type. This value corresponds to the index of the operation in the
`writeModels` list that was provided to `MongoClient.bulkWrite`. Drivers SHOULD use their language's standard numeric
type for indexes for this type (e.g. `usize` in Rust). If no standard index type exists, drivers MUST use `Int64`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this only come up in the Bulk Write spec? Would it make sense to amend the CRUD spec as well?

IIRC, Rust never implemented the old bulk write API. Did you not come across this with InsertManyResult?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this thread: https://mongodb.slack.com/archives/C035ZJL6CQN/p1724787735885729

It probably makes sense to update CRUD as well, although drivers probably won't make any changes to those types at this point. Rust already deviates from the spec and uses usize in InsertManyResult. Filed DRIVERS-2983.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants