Registering and releasing of Journal snapshots

Added a test of journal compaction with a registered snapshot and it
showed that the deleting of files did not correctly check the list of
registerd snapshots.  Corrected.
This commit is contained in:
martinsumner 2016-11-04 15:56:57 +00:00
parent 9abc1d643a
commit 479dc3ac80
4 changed files with 26 additions and 8 deletions

View file

@ -273,7 +273,7 @@ handle_call({release_snapshot, Snapshot}, _From , State) ->
{reply, ok, State#state{registered_snapshots=Rs}};
handle_call({confirm_delete, ManSQN}, _From, State) ->
Reply = lists:foldl(fun({_R, SnapSQN}, Bool) ->
case SnapSQN < ManSQN of
case SnapSQN >= ManSQN of
true ->
Bool;
false ->