Open
Description
Versions/Environment
- What version of Rust are you using? 1.81
- What operating system are you using? Linux
- What versions of the driver and its dependencies are you using? 3.0.0 or current master branch (a025f54)
- What version of MongoDB are you using? 7.0.11
- What is your MongoDB topology? replica set
Describe the bug
A clear and concise description of what the bug is.
collection.insert_one(doc!{_id: 2}).await?;
let result = collection.insert_many(vec![doc!{_id: 1},doc!{_id: 2}]).await;
if let ErrorKind::InsertMany(err) = *result.unwrap_err().kind {
// this fails, in both ordered and unordered insert_many
assert!(!err.inserted_ids.is_empty());
}
To Reproduce
Steps to reproduce the behavior:
- do either:
a. an unordered insert where some_id
s are new
b. an ordered insert where the first_id
s are new and a later one is duplicate - expect to see the successful insertions in
inserted_ids
- recoil in fear
P.S:
I would really love to see inserted_ids
be a IndexMap
or Vec<(K,V)>
rather than a HashMap
(what we have now) that randomizes order or a BTreeMap
that sorts the keys even though they are ordered in the server response.
P.P.S:
The commit template says
Make sure you have read CONTRIBUTING.md completely
There is no CONTRIBUTING.md
in the repository :v
If it's reffering to github.com/mongodb/mongo/CONTRIBUTING.rst
That now redirects to (github.com/mongodb/mongo/wiki)[https://github.com/mongodb/mongo/wiki] which tells me bug reports go in Jira and not here, and how to format my C++
Metadata
Metadata
Assignees
Labels
No labels