| a | b | |
|---|
| 0 | + | diff --git a/src/couchdb/couch_replicator.erl b/src/couchdb/couch_replicator.erl |
|---|
| 0 | + | index 315cec4..663ce27 100644 |
|---|
| 0 | + | --- a/src/couchdb/couch_replicator.erl |
|---|
| 0 | + | +++ b/src/couchdb/couch_replicator.erl |
|---|
| 0 | + | @@ -597,8 +597,18 @@ spawn_changes_reader(StartSeq, Db, ChangesQueue, Options) -> |
|---|
| 0 | + | read_changes(StartSeq, Db, ChangesQueue, Options) -> |
|---|
| 0 | + | try |
|---|
| 0 | + | couch_api_wrap:changes_since(Db, all_docs, StartSeq, |
|---|
| 0 | + | - fun(#doc_info{high_seq = Seq} = DocInfo) -> |
|---|
| 0 | + | - ok = couch_work_queue:queue(ChangesQueue, DocInfo), |
|---|
| 0 | + | + fun(#doc_info{high_seq = Seq, id = Id} = DocInfo) -> |
|---|
| 0 | + | + case Id of |
|---|
| 0 | + | + <<>> -> |
|---|
| 0 | + | + % Previous CouchDB releases had a bug which allowed a doc |
|---|
| 0 | + | + % with an empty ID to be inserted into databases. Such doc |
|---|
| 0 | + | + % is impossible to GET. |
|---|
| 0 | + | + ?LOG_ERROR("Replicator: ignoring document with empty ID in " |
|---|
| 0 | + | + "source database `~s` (_changes sequence ~p)", |
|---|
| 0 | + | + [couch_api_wrap:db_uri(Db), Seq]); |
|---|
| 0 | + | + _ -> |
|---|
| 0 | + | + ok = couch_work_queue:queue(ChangesQueue, DocInfo) |
|---|
| 0 | + | + end, |
|---|
| 0 | + | put(last_seq, Seq) |
|---|
| 0 | + | end, Options), |
|---|
| 0 | + | couch_work_queue:close(ChangesQueue) |
|---|
| ... | |
|---|