[Groonga-commit] droonga/fluent-plugin-droonga at dcc04aa [master] Validate relations of ring and farms correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Feb 12 19:39:43 JST 2014


YUKI Hiroshi	2014-02-12 19:39:43 +0900 (Wed, 12 Feb 2014)

  New Revision: dcc04aafacac4c91f65be4574696fd2783ae334c
  https://github.com/droonga/fluent-plugin-droonga/commit/dcc04aafacac4c91f65be4574696fd2783ae334c

  Message:
    Validate relations of ring and farms correctly

  Modified files:
    lib/droonga/catalog/base.rb

  Modified: lib/droonga/catalog/base.rb (+8 -8)
===================================================================
--- lib/droonga/catalog/base.rb    2014-02-12 19:21:56 +0900 (ff43600)
+++ lib/droonga/catalog/base.rb    2014-02-12 19:39:43 +0900 (39929df)
@@ -363,7 +363,7 @@ module Droonga
             partitions_set = part["partitions"]
             next if partitions_set.nil? || !partitions_set.is_a?(Hash)
             partitions_set.each do |range, partitions|
-              next unless partitions_set.is_a?(Array)
+              next unless partitions.is_a?(Array)
               partitions.each_with_index do |partition, index|
                 name = "datasets.#{dataset_name}.ring.#{ring_key}." +
                          "partitions.#{range}[#{index}]"
@@ -371,13 +371,13 @@ module Droonga
                   unless partition =~ valid_farms_matcher
                     raise UnknownFarm.new(name, partition, @path)
                   end
-                end
-                do_validation do
-                  directory_name = $POSTMATCH
-                  if directory_name.nil? or directory_name.empty?
-                    message = "\"#{partition}\" has no database name. " +
-                                "You mus specify a database name for \"#{name}\"."
-                    raise ValidationError.new(message, @path)
+                  do_validation do
+                    directory_name = $POSTMATCH
+                    if directory_name.nil? or directory_name.empty?
+                      message = "\"#{partition}\" has no database name. " +
+                                  "You mus specify a database name for \"#{name}\"."
+                      raise ValidationError.new(message, @path)
+                    end
                   end
                 end
               end
-------------- next part --------------
HTML����������������������������...
Download 



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