[SERVER-1513] Get last error with w:x needs to take into account priority of members of the replica set? Created: 29/Jul/10 Updated: 29/Aug/11 Resolved: 18/Mar/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 1.5.6 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | nosh petigara | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Description |
|
Looking through docs: db.runCommand( { getlasterror : 1 , w : 2 }) needs to take priority of slaves in the replica set if you have 3 in a set and one of them is slave only i.e. can never take over as primary, then you can still lose data if that is machine that the replication is confirmed to have gone to: Steps: A - current primary write to A. B is unreachable at the moment. A goes down. B takes over as primary (its now reachable). Resync happens between B and C. C drops data that B doesn't have. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 18/Mar/11 ] |
|
replica sets changed such that if a p=0 node is more current, it used to sync, and then another p=1 node takes over |
| Comment by Eliot Horowitz (Inactive) [ 01/Dec/10 ] |
|
Still might be issues, maybe we need this as an option with tags? |
| Comment by Eliot Horowitz (Inactive) [ 11/Nov/10 ] |
|
|
| Comment by Eliot Horowitz (Inactive) [ 11/Nov/10 ] |
|
may make sense to keep this logic actually and change how rollback with p=0 and p=1 work |
| Comment by Eliot Horowitz (Inactive) [ 11/Nov/10 ] |
|
Some questions I'm not sure of yet. if w=3 and 1 p=1 and 1 p=0 get it, is that ok? if NOT - then a lot of semantics don't make sense... |