YUKI Hiroshi
null+****@clear*****
Wed Jan 29 16:59:28 JST 2014
YUKI Hiroshi 2014-01-29 16:59:28 +0900 (Wed, 29 Jan 2014) New Revision: e905e1626343d941901430f22ddac2058fc06b28 https://github.com/droonga/fluent-plugin-droonga/commit/e905e1626343d941901430f22ddac2058fc06b28 Message: Add notes for the temporary implementation about errors Modified files: lib/droonga/distributor_plugin.rb lib/droonga/handler_messenger.rb lib/droonga/output_adapter.rb Modified: lib/droonga/distributor_plugin.rb (+5 -0) =================================================================== --- lib/droonga/distributor_plugin.rb 2014-01-29 16:50:37 +0900 (32e45ae) +++ lib/droonga/distributor_plugin.rb 2014-01-29 16:59:28 +0900 (fe1892c) @@ -49,6 +49,11 @@ module Droonga end end + #XXX Now, default scatterer/broadcaster/reducer/gatherer includes + # definitions to merge errors in the body. However, this makes + # the term "errors" reserved, so plugins cannot use their custom + # "errors" in the body. This must be rewritten. + def scatterer(message, key) { "command" => message["type"], Modified: lib/droonga/handler_messenger.rb (+3 -0) =================================================================== --- lib/droonga/handler_messenger.rb 2014-01-29 16:50:37 +0900 (8683341) +++ lib/droonga/handler_messenger.rb 2014-01-29 16:59:28 +0900 (22b0c1e) @@ -63,6 +63,9 @@ module Droonga "body" => body) @replier.reply(response) else + #XXX This is just a temporary solution. We should rewrite this, + # to put errors outside of the message body. Otherwise + # plugins cannot use the name "errors" for their message body. body = { "id" => @message.id, "input" => "errors", Modified: lib/droonga/output_adapter.rb (+1 -0) =================================================================== --- lib/droonga/output_adapter.rb 2014-01-29 16:50:37 +0900 (6c2e74a) +++ lib/droonga/output_adapter.rb 2014-01-29 16:59:28 +0900 (4eb8ae7) @@ -47,6 +47,7 @@ module Droonga end private + #XXX This is just a temporary solution. We should handle errors without "body", for safety. def adapt_errors(output_message) if output_message.body.include?("errors") errors = output_message.body["errors"] -------------- next part -------------- HTML����������������������������... 下載