[CSHARP-1479] Detect when a write has failed because of an election process Created: 16/Nov/15 Updated: 05/Apr/19 Resolved: 04/Dec/15 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity, Error Handling |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial - P5 |
| Reporter: | Elrom Behar | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | question, replicaset | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows, c# driver, replica set |
||
| Description |
|
Hey, I was wondering if I can detect the exact cause of a write failure in a replica set, when the cause is an election process being made. Is there a specific mongodb exception thrown or any other indication I can check? |
| Comments |
| Comment by Craig Wilson [ 04/Dec/15 ] |
|
Hi Elrom, There is not a specific error that you can catch to determine that actual cause of the failed write. The difference between a server being down and simply stepping down from being a primary are effectively the same thing, all the connections have been closed. Craig |