level: Calculate the size of the merged file correctly - again.

This commit is contained in:
Erik Søe Sørensen 2012-01-05 21:09:36 +01:00
parent 244e3128e9
commit 90ae581213

View file

@ -307,7 +307,7 @@ begin_merge(State) ->
MergePID = spawn_link(fun() ->
{ok, OutCount} = fractal_btree_merger:merge(AFileName, BFileName, XFileName,
State#state.level + 1),
(1 bsl State#state.level)),
% error_logger:info_msg("merge done ~p,~p -> ~p~n", [AFileName, BFileName, XFileName]),
@ -333,6 +333,3 @@ close_a_and_b(State) ->
filename(PFX, State) ->
filename:join(State#state.dir, PFX ++ "-" ++ integer_to_list(State#state.level) ++ ".data").
size(State) ->
(1 bsl State#state.level).