[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)
2) Bad data is written to master
3) The operator takes down the master, intending to prevent the bad data from being written to the slave
4) After the hour has elapsed, the slave applies the last batch of delayed operations it had read from the master before the master was taken offline

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?
So I don't think this is an issue unless I'm missing something??

Assign back to me if I am missing something.

Generated at Thu Feb 08 02:57:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.