Skip to content

Commit

Permalink
Merge pull request #236 from Tumblr/fix-early-alert
Browse files Browse the repository at this point in the history
Enable monitoring after each node has already caught up
  • Loading branch information
Graham Christensen authored and GitHub Enterprise committed May 30, 2017
2 parents c035d2b + 249c651 commit 4bf6278
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/jetpants/db/replication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,12 @@ def enslave_siblings!(targets)

clone_to!(targets)
targets.each do |t|
t.enable_monitoring
t.change_master_to(master, change_master_options)
t.enable_read_only!
end
[ self, targets ].flatten.each(&:resume_replication) # should already have happened from the clone_to! restart anyway, but just to be explicit
[ self, targets ].flatten.concurrent_each{|n| n.catch_up_to_master 21600 }
enable_monitoring
[ self, targets ].flatten.each(&:enable_monitoring)
end

# Shortcut to call DB#enslave_siblings! on a single target
Expand Down

0 comments on commit 4bf6278

Please sign in to comment.