[Groonga-commit] droonga/droonga-engine at 8c45c65 [master] Update catalog correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Sun Jun 29 03:50:28 JST 2014


YUKI Hiroshi	2014-06-29 03:50:28 +0900 (Sun, 29 Jun 2014)

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

  Message:
    Update catalog correctly

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

  Modified: lib/droonga/command/serf_event_handler.rb (+4 -4)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2014-06-29 03:49:58 +0900 (73aa445)
+++ lib/droonga/command/serf_event_handler.rb    2014-06-29 03:50:28 +0900 (e93065b)
@@ -144,8 +144,8 @@ module Droonga
         puts "joining to the cluster: update myself"
 
         modify_catalog do |modifier|
-          modifier.datasets[dataset].replicas.hosts += other_hosts
-          modifier.datasets[dataset].replicas.hosts.uniq!
+          modifier.datasets[dataset_name].replicas.hosts += other_hosts
+          modifier.datasets[dataset_name].replicas.hosts.uniq!
         end
         sleep(1) # wait for restart
 
@@ -153,7 +153,7 @@ module Droonga
 
         source_node  = "#{source}:#{port}/#{tag}"
         Serf.send_query(source_node, "add_replicas",
-                        "dataset" => dataset,
+                        "dataset" => dataset_name,
                         "hosts"   => [host])
       end
 
@@ -203,7 +203,7 @@ module Droonga
       def modify_catalog
         generator = create_current_catalog_generator
         yield(generator)
-        SafeFileWriter.write(Path.catalog, JSON.pretty_generate(generator.catalog))
+        SafeFileWriter.write(Path.catalog, JSON.pretty_generate(generator.generate))
       end
 
       def create_current_catalog_generator
-------------- next part --------------
HTML����������������������������...
Download 



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