Permalink
Browse files

If a reload fails, clear Einhorn::State.reloading_for_preload_upgrade.

If a reload failed, this was causing further SIGALRMs to not bother
reloading, since they thought we were already doing so. In conjunction
with preloading, this meant we would never upgrade our workers.
  • Loading branch information...
1 parent 356d254 commit 27f5313b96270d0354bf79b7007d4d389a00030e @nelhage nelhage committed Jan 29, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/einhorn/command.rb
View
@@ -200,6 +200,7 @@ def self.reload
exec [Einhorn::TransientState.script_name, Einhorn::TransientState.script_name], *(['--with-state-fd', read.fileno.to_s, '--'] + Einhorn::State.cmd)
rescue SystemCallError => e
Einhorn.log_error("Could not reload! Attempting to continue. Error was: #{e}")
+ Einhorn::State.reloading_for_preload_upgrade = false
read.close
end
end

0 comments on commit 27f5313

Please sign in to comment.