[SERVER-1702] slave w/ slavedelay may apply old ops when master is down Created: 30/Aug/10 Updated: 19/Mar/13 Resolved: 08/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
We could potentially have the following scenario: 1) A slave is specified with a slave delay (say an hour or so) Do we want to do anything about this, or is it the operator's job to make sure the slave node is restarted in a scenario like this? |
| Comments |
| Comment by Eric Milkie [ 08/Mar/13 ] |
|
replica set slave delay is handled in a better way |
| Comment by Aaron Staple [ 31/Aug/10 ] |
|
I was asked to implement slave delay by having the thread which applies operations sleep when it sees an op that's too fresh to be applied. But this implies that a fresh op must be read by the slave in order for the slave to sleep, and currently the slave isn't resetting its connection to master in this situation. So there are going to be one or more ops that are too fresh sitting on the slave - currently they will be applied after an hour regardless of whether or not the master is still up at that time. |
| Comment by Eliot Horowitz (Inactive) [ 31/Aug/10 ] |
|
Isn't the oplog xfer delayed an hour? Assign back to me if I am missing something. |