-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
None
-
Component/s: Bulk API
-
None
-
Not Needed
Summary
Currently, the specification requires a driver to use `Int64` for indexes of models in the NamespaceWriteModelPair[] array:
- insertResults: Map<Int64, InsertOneResult>
- updateResults: Map<Int64, UpdateResult>
- deleteResults: Map<Int64, DeleteResult>
- writeErrors: Map<Int64, WriteError>
In Java, indexes of arrays are int, which means that Map<Integer, ...> makes sense in Java. In Rust, indexes of arrays are usize, which means, that HashMap<usize, ...> probably makes sense in Rust.
Let's explicitly allow a driver to choose the type that makes best sense for the driver.
Motivation
Who is the affected end user?
The people who implement and maintain drivers, as well as end-users who may have to deal with a sub-optimal API.
How does this affect the end user?
They can be annoyed by the sub-optimal API.
How likely is it that this problem or use case will occur?
Not applicable.
If the problem does occur, what are the consequences and how severe are they?
It affects usability and may make implementing the API more difficult.
Is this issue urgent?
It better be addressed before more drivers implement the new bulk write API.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
No.
Acceptance Criteria
The specification does not infringe on the driver devs ability to pick the optimal type for array indexes.