[GODRIVER-738] Data Inconsistency with MongoDB using mongo-go-driver Created: 30/Dec/18  Updated: 27/Oct/23  Resolved: 04/Jan/19

Status: Closed
Project: Go Driver
Component/s: CRUD
Affects Version/s: 0.1.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Conard James Faraon Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 16.04, macOS Mojave



 Description   

FindOneAndReplace may or may not replace the document in MongoDB. The response indicates that the operation succeeded, but looking into MongoDB it was not updated at all.

I tried running MongoDB server locally. I tried starting a new MongoDB server in Azure CosmosDB

 

 

Additional screenshots and code snippets can be found in https://stackoverflow.com/questions/53979086/data-inconsistency-with-mongodb-using-mongo-go-driver

 

 



 Comments   
Comment by Conard James Faraon [ 02/Jan/19 ]

This bug does not happen with MongoDB Server 3.4.4 with mongo-go-driver 0.1.0

 

Please close. I am sorry for the inconvenience.

Comment by Conard James Faraon [ 02/Jan/19 ]

 I am trying to upgrade to 0.1.0. I will update.

Comment by Conard James Faraon [ 31/Dec/18 ]

The MongoDB server version is MongoDB server version: 3.2.0 This bug is reproducible in Ubuntu 16.04 and macOS Mojave. The target host is Azure CosmosDB.

The driver version is mongo-go-driver@v0.0.17

Comment by Conard James Faraon [ 30/Dec/18 ]

Here is the entire repo if it helps.

https://github.com/hwsc-org/hwsc-document-svc/blob/master/service/service.go#L448

Whenever FindOneAndReplace is used, there is a chance that the database does not reflect the replacement. I am not totally sure why the document that comes back reflects the correct state, but not in the actual database.

This was not happening a more than a month ago.

Generated at Thu Feb 08 08:34:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.