YUKI Hiroshi
null+****@clear*****
Thu Oct 9 14:33:23 JST 2014
YUKI Hiroshi 2014-10-09 14:33:23 +0900 (Thu, 09 Oct 2014) New Revision: 9f03f9a01ba753fea10d92c66a2a8690910d0b68 https://github.com/droonga/droonga-engine/commit/9f03f9a01ba753fea10d92c66a2a8690910d0b68 Message: Add codes to restart workers after schema change (WIP) Modified files: lib/droonga/plugins/groonga/column_create.rb lib/droonga/plugins/groonga/column_remove.rb lib/droonga/plugins/groonga/column_rename.rb lib/droonga/plugins/groonga/generic_command.rb lib/droonga/plugins/groonga/table_create.rb lib/droonga/plugins/groonga/table_remove.rb Modified: lib/droonga/plugins/groonga/column_create.rb (+5 -2) =================================================================== --- lib/droonga/plugins/groonga/column_create.rb 2014-10-07 18:49:30 +0900 (266b870) +++ lib/droonga/plugins/groonga/column_create.rb 2014-10-09 14:33:23 +0900 (a9e73d3) @@ -29,11 +29,14 @@ module Droonga table_name = valid_table_name("table", :error_result => false) + result = false if****@comma*****_index? - define_index(table_name) + result = define_index(table_name) else - define_column(table_name) + result = define_column(table_name) end + restart_workers + result end private Modified: lib/droonga/plugins/groonga/column_remove.rb (+3 -1) =================================================================== --- lib/droonga/plugins/groonga/column_remove.rb 2014-10-07 18:49:30 +0900 (9ee130e) +++ lib/droonga/plugins/groonga/column_remove.rb 2014-10-09 14:33:23 +0900 (48ebbf6) @@ -31,7 +31,9 @@ module Droonga column_name = valid_column_name("name", :table_name => table_name, :error_result => false) - remove_column(table_name, column_name) + result = remove_column(table_name, column_name) + restart_workers + result end private Modified: lib/droonga/plugins/groonga/column_rename.rb (+3 -1) =================================================================== --- lib/droonga/plugins/groonga/column_rename.rb 2014-10-07 18:49:30 +0900 (fad8a04) +++ lib/droonga/plugins/groonga/column_rename.rb 2014-10-09 14:33:23 +0900 (600a66a) @@ -33,7 +33,9 @@ module Droonga new_name = @command["new_name"] - rename_column(table_name, column_name, new_name) + result = rename_column(table_name, column_name, new_name) + restart_workers + result end private Modified: lib/droonga/plugins/groonga/generic_command.rb (+4 -0) =================================================================== --- lib/droonga/plugins/groonga/generic_command.rb 2014-10-07 18:49:30 +0900 (ef67706) +++ lib/droonga/plugins/groonga/generic_command.rb 2014-10-09 14:33:23 +0900 (c9938a6) @@ -102,6 +102,10 @@ module Droonga column_name end + + def restart_workers + #XXX IMPLEMENT ME!! + end end end end Modified: lib/droonga/plugins/groonga/table_create.rb (+1 -0) =================================================================== --- lib/droonga/plugins/groonga/table_create.rb 2014-10-07 18:49:30 +0900 (05c8154) +++ lib/droonga/plugins/groonga/table_create.rb 2014-10-09 14:33:23 +0900 (e48dd78) @@ -39,6 +39,7 @@ module Droonga ::Groonga::Schema.define(:context => @context) do |schema| schema.create_table(name, options) end + restart_workers true end Modified: lib/droonga/plugins/groonga/table_remove.rb (+1 -0) =================================================================== --- lib/droonga/plugins/groonga/table_remove.rb 2014-10-07 18:49:30 +0900 (59b51e4) +++ lib/droonga/plugins/groonga/table_remove.rb 2014-10-09 14:33:23 +0900 (f46d621) @@ -32,6 +32,7 @@ module Droonga ::Groonga::Schema.define(:context => @context) do |schema| schema.remove_table(name) end + restart_workers true end end -------------- next part -------------- HTML����������������������������... Descargar