anchor.diff:                  %% we're logging everything else here
                   ?xdcr_error("out of ~p docs, succ to send ~p docs, fail to send others "
                               "(by error type, enoent: ~p, not-my-vb: ~p, einval: ~p, "
  -                            "other errors: ~p",
  -                            [DocsListSize, (Flushed + Eexist), Enoent, NotMyVb, Einval, OtherErr]),
  +                            "tmp fail: ~p, enomem: ~p, other errors: ~p",
  +                            [DocsListSize, (Flushed + Eexist), Enoent, NotMyVb,
  +                             Einval, TmpFail, Enomem, OtherErr]),
   
                   %% stop replicator if too many memacched errors
                   case (Flushed + Eexist + ?XDCR_XMEM_MEMCACHED_ERRORS) > DocsListSize of
  
positive.code:                         Header#mc_header{opcode = Opcode}, mc_client_binary:ext(Opcode, Entry)),
      ok.
  
  categorise_statuses(Statuses, DocsList) ->
      categorise_statuses_loop(Statuses, DocsList, 0, 0, 0, 0, 0, 0, []).
  
  categorise_statuses_loop([], [], Flushed, Enoent, Eexist, NotMyVb, Einval, OtherErr, ErrorKeys) ->
      {Flushed, Enoent, Eexist, NotMyVb, Einval, OtherErr, lists:reverse(ErrorKeys)};
  categorise_statuses_loop([Status | RestSt], [#doc{id=Key} | RestDocs],
                           Flushed, Enoent, Eexist, NotMyVb, Einval, OtherErr, ErrorKeys) ->
      case Status of
          success ->
              categorise_statuses_loop(RestSt, RestDocs, Flushed + 1, Enoent, Eexist, NotMyVb, Einval, OtherErr, ErrorKeys);
          key_enoent ->
              categorise_statuses_loop(RestSt, RestDocs, Flushed, Enoent + 1, Eexist, NotMyVb, Einval, OtherErr, [Key | ErrorKeys]);
          key_eexists ->
              categorise_statuses_loop(RestSt, RestDocs, Flushed, Enoent, Eexist + 1, NotMyVb, Einval, OtherErr, [Key | ErrorKeys]);
          not_my_vbucket ->
              categorise_statuses_loop(RestSt, RestDocs, Flushed, Enoent, Eexist, NotMyVb + 1, Einval, OtherErr, [Key | ErrorKeys]);
          einval ->
              categorise_statuses_loop(RestSt, RestDocs, Flushed, Enoent, Eexist, NotMyVb, Einval + 1, OtherErr, [Key | ErrorKeys]);
          _ ->
              categorise_statuses_loop(RestSt, RestDocs, Flushed, Enoent, Eexist, NotMyVb, Einval, OtherErr + 1, [Key | ErrorKeys])
      end.
  
negative.code:                     _ ->
                          ErrorStr = ?format_msg("in batch of ~p docs: flushed: ~p, rejected (eexists): ~p; "
                                                 "remote memcached errors: enoent: ~p, not-my-vb: ~p, invalid: ~p, "
                                                 "tmp fail: ~p, enomem: ~p, others: ~p",
                                                 [DocsListSize, Flushed, Eexist, Enoent, NotMyVb,
                                                  Einval, TmpFail, Enomem, OtherErr]),
                          {stop, {error, {ErrorStr, ErrorKeys}}, State}
                  end
          end,
  