Refactor Penciller Push

Two aspects of pushing to the penciller have been refactored:
1 - Allow the penciller to respond before the ETS table has been updated
to unlock the Bookie sooner.
2 - Change the way the copy of the memtable is stored to work more
effectively with snapshots wihtout locking the Penciller any further on
a snapshot or push request
This commit is contained in:
martinsumner 2016-09-21 18:31:42 +01:00
parent 66d6db4e11
commit d3e985ed80
5 changed files with 433 additions and 211 deletions

View file

@ -59,12 +59,12 @@ handle_cast(stop, State) ->
{stop, normal, State}.
handle_info(timeout, State) ->
%% The pcl prompt will cause a penciller_prompt, to re-trigger timeout
case leveled_penciller:pcl_prompt(State#state.owner) of
ok ->
{noreply, State};
Timeout = requestandhandle_work(State),
{noreply, State, Timeout};
pause ->
{noreply, State}
{noreply, State, ?INACTIVITY_TIMEOUT}
end;
handle_info(_Info, State) ->
{noreply, State}.