Re: Delayed Replica promoted to Primary

24 views
Skip to first unread message

Jenna

unread,
Aug 22, 2012, 12:40:24 PM8/22/12
to mongodb-user
Hi Cameron,
There is no easy way to force the delayed node to become the primary,
and this process requires downtime since each member of the replica
set must completely resync from the delayed node. You will also lose
any writes that took place during the window of delay. While not
impossible, this process is cumbersome, requires downtime, and is
probably not much faster than dumping and restoring individual
collections (or querying for individual documents) from the delayed
node.

On Aug 20, 5:00 pm, Cameron Guill <cgu...@gmail.com> wrote:
> (short) How would I go about properly converting a DelayedReplica to a
> Primary?
>
> (long) I have a sharded replication cluster of 7 nodes on a single shard.
>  3 boxes with shard servers, 1 hidden priority 0 backup box, 2 regular
> boxes, and 1 delayed box with a multi-hour delay.  This delay box is there
> in case someone rolls out code that drops a collection (or more) in
> production.  Some of these collections are fairly large and can take >5hrs
> to restore each using traditional mongorestore.  As such, I would like to
> be able to convert the cluster to using the delayedReplica as the Primary
> if we notice a disaster event occur.  Once the other boxes are back in sync
> with the delayedReplica I would like to convert one to delayed again for
> the next disaster event.
>
> How would could this be accomplished?  I see how to make a box a
> delayedReplica with the multi-hour delay, but I do not see a way to
> "easily" convert him to being the Primary and causing all of the other
> Secondary (and previous Primary) to use his data set.
>
> Any help would be appreciated.
>
> - Cameron
Reply all
Reply to author
Forward
0 new messages