Github user jaydoane commented on a diff in the pull request:
https://github.com/apache/couchdb-couch-replicator/pull/54#discussion_r99449067
--- Diff: src/couch_replicator_changes_reader.erl ---
@@ -89,9 +89,20 @@ process_change(#doc_info{id = <<>>} = DocInfo, {_, Db,
_, _, _}) ->
"source database `~s` (_changes sequence ~p)",
[couch_replicator_api_wrap:db_uri(Db), DocInfo#doc_info.high_seq]);
-process_change(#doc_info{} = DocInfo, {_, _, ChangesQueue, _, _}) ->
- ok = couch_work_queue:queue(ChangesQueue, DocInfo),
- put(last_seq, DocInfo#doc_info.high_seq);
+process_change(#doc_info{id = Id} = DocInfo, {Parent, Db, ChangesQueue, _,
_}) ->
+ case is_doc_id_too_long(byte_size(Id)) of
+ true ->
+ ShortId = lists:sublist(binary_to_list(Id), 64),
+ SourceDb = couch_replicator_api_wrap:db_uri(Db),
+ couch_log:error("Replicator: document id `~s...` from source
db "
+ " `~s` is too long, ignoring.", [ShortId, SourceDb]),
+ Stats = couch_replicator_stats:new([{doc_write_failures, 1}]),
+ ok = gen_server:call(Parent, {add_stats, Stats}, infinity),
+ ok;
--- End diff --
I believe this final ok is redundant
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---