Navigation Menu

Skip to content

Commit

Permalink
Revert "Set cluster id as a serf tag"
Browse files Browse the repository at this point in the history
This reverts commit 464c89d.
  • Loading branch information
piroor committed Jun 26, 2014
1 parent c9d966d commit c2542a8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions lib/droonga/engine.rb
Expand Up @@ -33,10 +33,6 @@ def initialize(loop, name, internal_name)
@state = EngineState.new(loop, name, internal_name)
@catalog = load_catalog
@state.catalog = @catalog

serf = Serf.new(loop, name)
serf.set_tag("cluster_id", @state.cluster_id)

@dispatcher = create_dispatcher
@nodes_status_observer = FileObserver.new(loop, Path.nodes_status)
@nodes_status_observer.on_change = lambda do
Expand Down
9 changes: 0 additions & 9 deletions lib/droonga/engine_state.rb
Expand Up @@ -16,7 +16,6 @@
require "English"

require "coolio"
require "digest/sha1"

require "droonga/loggable"
require "droonga/event_loop"
Expand Down Expand Up @@ -117,21 +116,13 @@ def nodes_status=(new_status)
@nodes_status = new_status
end

def cluster_id
@cluster_id ||= prepare_cluster_id
end

private
def prepare_live_nodes
@nodes_status.keys.select do |key|
@nodes_status[key]["live"]
end
end

def prepare_cluster_id
Digest::SHA1.hexdigest(all_nodes.join("\n"))
end

def log_tag
"engine_state"
end
Expand Down

0 comments on commit c2542a8

Please sign in to comment.