Skip to content

Commit

Permalink
Don't create state for the state_passer as a child
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-stripe committed Aug 19, 2014
1 parent c9b75b1 commit 673f5a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 7 additions & 0 deletions lib/einhorn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ def self.update_state(store, store_name, old_state)
updated_state[:reloading_for_upgrade] = updated_state.delete(:reloading_for_preload_upgrade)
message << "upgraded :reloading_for_preload_upgrade to :reloading_for_upgrade"
end

# For a period, we created children entries for state_passers,
# but we don't want that (in particular, it probably died before
# we could setup our SIGCHLD handler
if updated_state[:children]
updated_state[:children].delete_if {|k, v| v[:type] == :state_passer}
end
end

default = store.default_state
Expand Down
3 changes: 0 additions & 3 deletions lib/einhorn/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ def self.reload
fork do
Einhorn::TransientState.whatami = :state_passer
Einhorn::State.generation += 1
Einhorn::State.children[$$] = {
:type => :state_passer
}
read.close

begin
Expand Down

0 comments on commit 673f5a8

Please sign in to comment.