[CSHARP-2907] Can't insert/update data while in a transaction Created: 21/Jan/20 Updated: 27/Oct/23 Resolved: 21/Jan/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 2.10.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Murilo Kunze | Assignee: | Jeffrey Yemin |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
windows 10, mongo 4.2 |
||
| Attachments: |
|
| Description |
|
I'm receiving the message "This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string." while I'm trying to insert data. |
| Comments |
| Comment by Jeffrey Yemin [ 21/Jan/20 ] |
|
Yes, that's definitely the case. The transaction implementation relies on the replication oplog, which is not present in standalone servers. You can, however, create a single-member replica set, which is almost as easy to manage as a standalone. See https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set/ for instructions. Good luck! |
| Comment by Murilo Kunze [ 21/Jan/20 ] |
|
Hi Jeffrey, it's a standalone instalation. |
| Comment by Jeffrey Yemin [ 21/Jan/20 ] |
|
Hi murilokunze We'd like to help you get past this problem, but to do that we'll need some more information. You mention that your application is connecting to a MongoDB 4.2 server, but we also need to know what the deployment scenario is. Is your application connecting to a standalone, a replica set, or a sharded cluster? |