[Groonga-commit] droonga/droonga-engine at 0c7287c [master] Reject invalid values near the calculation

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 14 12:58:18 JST 2015


YUKI Hiroshi	2015-04-14 12:58:18 +0900 (Tue, 14 Apr 2015)

  New Revision: 0c7287cbfab7f005aa9175fbea8d24176046f655
  https://github.com/droonga/droonga-engine/commit/0c7287cbfab7f005aa9175fbea8d24176046f655

  Message:
    Reject invalid values near the calculation

  Modified files:
    lib/droonga/plugins/system/absorb_data.rb

  Modified: lib/droonga/plugins/system/absorb_data.rb (+3 -0)
===================================================================
--- lib/droonga/plugins/system/absorb_data.rb    2015-04-14 12:58:01 +0900 (3863959)
+++ lib/droonga/plugins/system/absorb_data.rb    2015-04-14 12:58:18 +0900 (fd6740d)
@@ -119,6 +119,9 @@ module Droonga
           end
 
           def progress_percentage
+            if @total_n_source_records.nil? or @total_n_source_records.zero?
+              return 0
+            end
             progress = @n_processed_messages / @total_n_source_records
             [(progress * 100).to_i, 100].min
           end
-------------- next part --------------
HTML����������������������������...
Download 



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