YUKI Hiroshi
null+****@clear*****
Thu Nov 7 17:18:49 JST 2013
YUKI Hiroshi 2013-11-07 17:18:49 +0900 (Thu, 07 Nov 2013) New Revision: 2ab57b01f52bc47499c3174c0edeefc15ae9cdec https://github.com/droonga/fluent-plugin-droonga/commit/2ab57b01f52bc47499c3174c0edeefc15ae9cdec Message: Don't try to create tables by worker processes (workaround) Modified files: lib/droonga/plugin/handler_watch.rb Modified: lib/droonga/plugin/handler_watch.rb (+17 -1) =================================================================== --- lib/droonga/plugin/handler_watch.rb 2013-11-07 16:14:12 +0900 (663edf4) +++ lib/droonga/plugin/handler_watch.rb 2013-11-07 17:18:49 +0900 (f1928d9) @@ -26,7 +26,23 @@ module Droonga def initialize(*args) super - ensure_schema_created + + # XXX just workaround. This must be re-written. + # When secondary and later processes opens the database, + # creation processes of tables by the first process is + # not finished yet. Then secondary and others tries to + # create tables and raises errors. To avoid such a problem, + # the creation processes of tables is disabled on workers. + try to create + if $0 !~ /\AServer/ + ensure_schema_created + else + until @context["Keyword"] + sleep 0.1 + end + sleep 1 + end + @watcher = Watcher.new(@context) @sweeper = Sweeper.new(@context) end -------------- next part -------------- HTML����������������������������...Download