Prune dead branches

This commit is contained in:
martinsumner 2016-11-04 19:33:11 +00:00
parent 2299e1ce9d
commit 34a90231e0
2 changed files with 2 additions and 8 deletions

View file

@ -762,13 +762,7 @@ compact_empty_file_test() ->
LedgerSrv1 = [{8, {o, "Bucket", "Key1", null}},
{2, {o, "Bucket", "Key2", null}},
{3, {o, "Bucket", "Key3", null}}],
LedgerFun1 = fun(Srv, Key, ObjSQN) ->
case lists:keyfind(ObjSQN, 1, Srv) of
{ObjSQN, Key} ->
true;
_ ->
false
end end,
LedgerFun1 = fun(_Srv, _Key, _ObjSQN) -> false end,
Score1 = check_single_file(CDB2, LedgerFun1, LedgerSrv1, 9, 8, 4),
?assertMatch(100.0, Score1).

View file

@ -378,7 +378,7 @@ terminate(Reason, State) ->
ok = file:close(State#state.handle),
ok = file:delete(State#state.filename);
_ ->
ok = file:close(Handle)
ok = file:close(State#state.handle)
end.
code_change(_OldVsn, State, _Extra) ->