-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
`mongodb` crate version: 1.0.0
Hi,
I'm having an issue with the stable driver release.
I have a `findOne` operation like this:
```rust
coll.find_one(doc!("name": "same_name"), None).await?;
```
But this fails with `ResponseError` error kind.
I modified `CommandResponse::body` method to print the document stored in the `raw_response` field.
Here is the output:
```Document({"n": Int32(0), "nModified": Int32(0), "ok": Double(1.0)})```
Also the error is displayed as:
> The server returned an invalid reply to a database operation: missing field `cursor`
Here are other occurrences:
Document({"cursor": Document(Document(
{"firstBatch": Array([]), "id": Int64(0), "ns": String("waykden.peer")})), "ok": Double(1.0)})
↓
The server returned an invalid reply to a database operation: missing field `n`
Document({"n": Int32(1), "ok": Double(1.0)})
↓
The server returned an invalid reply to a database operation: missing field `cursor`
I can't reproduce this error in simple situation. I'm testing with an heavy load. At first everything is fine, but as time passes things get worse and the error end up always showing up even once I stop the load test and try with a single connection. Maybe some internal state get broken, but I couldn't determine the source. Do you have an idea?
Thanks!