anchor.diff:          DocsGroups = group_changes(Docs),
           DocsList = maps:to_list(DocsGroups),
           Ref = make_ref(),
  -        parallel_apply(DocsList, Ref),
  -        Ans = gather_answers(DocsList, Ref),
  +        Pids = parallel_apply(DocsList, Ref),
  +        Ans = gather_answers(Pids, Ref),
           Master ! {batch_applied, BatchRange, Ans}
       end),
       ok.
  
positive.code: %% Gather appropriate number of workers' answers.
  %% @end
  %%--------------------------------------------------------------------
  -spec gather_answers(non_neg_integer(), reference(),
      ok | {error, datastore:seq(), term()}) ->
      ok | timeout | {error, datastore:seq(), term()}.
  gather_answers(0, _Ref, Ans) ->
      Ans;
  gather_answers(N, Ref, TmpAns) ->
      receive
          {changes_worker_ans, Ref, Ans} ->
              Merged = case {Ans, TmpAns} of
                  {ok, _} -> TmpAns;
                  {{error, Seq, _}, {error, Seq2, _}} when Seq < Seq2 -> Ans;
                  {{error, _, _}, {error, _, _}} -> TmpAns;
                  _ -> Ans
              end,
              gather_answers(N - 1, Ref, Merged)
      after
          ?WORKER_TIMEOUT -> timeout
      end.
negative.code: %% @end
  %%--------------------------------------------------------------------
  -spec parallel_apply([{datastore:key(),
      [datastore:doc()]}], reference()) -> [pid()].
  parallel_apply(DocsList, Ref) ->
      Master = self(),
      lists:map(fun({_, DocList}) ->
          spawn(fun() ->
              SlaveAns = lists:foldl(fun
                  (Doc, ok) ->
  