[Groonga-commit] droonga/droonga-engine at b5c2679 [master] Load catalog information correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Sun Jun 29 03:49:58 JST 2014


YUKI Hiroshi	2014-06-29 03:49:58 +0900 (Sun, 29 Jun 2014)

  New Revision: b5c26792b4d175ec47b24783b1816a8ef2d40df6
  https://github.com/droonga/droonga-engine/commit/b5c26792b4d175ec47b24783b1816a8ef2d40df6

  Message:
    Load catalog information correctly

  Modified files:
    lib/droonga/command/serf_event_handler.rb

  Modified: lib/droonga/command/serf_event_handler.rb (+8 -4)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2014-06-29 03:49:26 +0900 (26242f9)
+++ lib/droonga/command/serf_event_handler.rb    2014-06-29 03:49:58 +0900 (73aa445)
@@ -98,6 +98,7 @@ module Droonga
 
       def join
         type = @payload["type"]
+        puts "type = #{type}"
         case type
         when "replica"
           join_as_replica
@@ -108,14 +109,17 @@ module Droonga
         source = @payload["source"]
         return unless source
 
+        puts "source  = #{source}"
+
         generator = create_current_catalog_generator
-        dataset = generator.dataset_for_host(source)
+        dataset = generator.dataset_for_host(source) ||
+                    generator.dataset_for_host(host)
         return unless dataset
 
         dataset_name = dataset.name
-        tag          = dataset.tag
-        port         = dataset.port
-        other_hosts  = dataset.hosts
+        tag          = dataset.replicas.tag
+        port         = dataset.replicas.port
+        other_hosts  = dataset.replicas.hosts
 
         puts "dataset = #{dataset_name}"
         puts "port    = #{port}"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index