anchor.diff:  join_logs([], _F, Acc) ->
       Acc;
   join_logs([{_Preflist, Log}|T], F, Acc) ->
  -    JointAcc = dets:foldl(F, Acc, Log),
  +    JointAcc = fold_log(Log, start, F, Acc),
       join_logs(T, F, JointAcc).
  +
  +fold_log(Log, Continuation, F, Acc) ->
  +    case  disk_log:chunk(Log,Continuation) of 
  +        eof ->
  +            Acc;
  +        {Next,Ops} ->
  +            NewAcc = lists:foldl(F, Acc, Ops),
  +            fold_log(Log, Next, F, NewAcc)
  +    end.
  +
   
   %% @doc insert_operation: Inserts an operation into the log only if the
   %%      OpId is not already in the log
  
positive.code:                #state{partition=Partition, logs_map=Map}=State) ->
      case get_log_from_map(Map, Partition, LogId) of
          {ok, Log} ->
              case get_log(Log, LogId) of
                  [] ->
                      {reply, {ok, []}, State};
                  [H|T] ->
                      {reply, {ok, [H|T]}, State};
                  {error, Reason}->
                      {reply, {error, Reason}, State}
              end;
          {error, Reason} ->
              {reply, {error, Reason}, State}
  
negative.code:     true;
  no_elements([LogId|Rest], Map) ->
      case dict:find(LogId, Map) of
          {ok, Log} -> 
              case disk_log:chunk(Log, start) of
                  eof ->
                      no_elements(Rest, Map);
                  _ ->
                      false
              end;
          error ->
              {error, no_log_for_preflist}
      end.
  
  %% @doc open_logs: open one log per partition in which the vnode is primary
  