[Groonga-commit] groonga/groonga at afa1b57 [master] grndb: add partial check implementation

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 26 00:29:55 JST 2014


Kouhei Sutou	2014-12-26 00:29:55 +0900 (Fri, 26 Dec 2014)

  New Revision: afa1b57bfd000128d67ee3a4fe6bd027c6f16b95
  https://github.com/groonga/groonga/commit/afa1b57bfd000128d67ee3a4fe6bd027c6f16b95

  Message:
    grndb: add partial check implementation

  Modified files:
    lib/mrb/scripts/command/grndb.rb

  Modified: lib/mrb/scripts/command/grndb.rb (+13 -0)
===================================================================
--- lib/mrb/scripts/command/grndb.rb    2014-12-26 00:25:20 +0900 (59bcea2)
+++ lib/mrb/scripts/command/grndb.rb    2014-12-26 00:29:55 +0900 (2914617)
@@ -69,8 +69,21 @@ module Groonga
         when :recover
           database.recover
           true
+        when :check
+          check(database)
         end
       end
+
+      def check(database)
+        all_unlocked = true
+        database.each do |object|
+          if object.locked?
+            # TODO: Report
+            all_unlocked = false
+          end
+        end
+        all_unlocked
+      end
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
다운로드 



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