[Groonga-commit] droonga/fluent-plugin-droonga at 2ab57b0 [master] Don't try to create tables by worker processes (workaround)

Back to archive index

Kenji Okimoto okimo****@clear*****
Thu Nov 7 18:03:01 JST 2013


 > +      # the creation processes of tables is disabled on workers.
 > +      try to create
 > +      if $0 !~ /\AServer/

コメント?がはみ出ているように見えますが、大丈夫でしょうか?


On 2013年11月07日 17:18, YUKI Hiroshi wrote:
> Author
>     YUKI Hiroshi <shimoda �� clear-code.com>
> Date
>     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
>         <https://github.com/droonga/fluent-plugin-droonga/commit/2ab57b01f52bc47499c3174c0edeefc15ae9cdec#diff-0>
>
>    Modified: lib/droonga/plugin/handler_watch.rb (+17 -1)
> ===================================================================
> @@ -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
>
>
>
> _______________________________________________
> Groonga-commit mailing list
> Groonga-commit �� lists.sourceforge.jp
> http://lists.sourceforge.jp/mailman/listinfo/groonga-commit
>


-- 
Kenji Okimoto <okimoto �� clear-code.com>




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