Skip to content

Commit

Permalink
Modified for fixing leo-project/leofs/issues/455
Browse files Browse the repository at this point in the history
  • Loading branch information
yosukehara committed Mar 3, 2016
1 parent 7483109 commit 2885cff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/leo_storage_watchdog_sub.erl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,13 @@ is_candidates_2([#compaction_info{total_size = SumTotalSize,
Acc_1 = case (DiffCompactionDate >= CompactionInterval) of
true ->
%% Check a fragmentation ratio
ActiveSizeRatio = erlang:round(SumActiveSize / SumTotalSize * 100),
ActiveSizeRatio =
case (SumTotalSize > 0) of
true when SumActiveSize > 0 ->
erlang:round(SumActiveSize / SumTotalSize * 100);
_ ->
0
end,
ThresholdActiveSizeRatio = ?env_threshold_active_size_ratio(),
case (ActiveSizeRatio =< ThresholdActiveSizeRatio) of
true ->
Expand Down

0 comments on commit 2885cff

Please sign in to comment.