[CSHARP-2585] Detect stale data Created: 12/Apr/19 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Operations |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Benjamin Lalonde | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
It would be great for mongo to detect staledata, that is when 2 concurrent threads read a document simultaneously and try to modify it, first thread passes put mongo detects that second one is trying to update a document which is out to date compared to mongo version. https://stackoverflow.com/questions/33928136/mongodb-optimistic-concurrency-control-with-net |
| Comments |
| Comment by Benjamin Lalonde [ 15/Apr/19 ] |
|
One thing to note is this should work in scenario where document is loaded in memory, modified and saved back to mongo. |