cloudant/couch_replicator — pull request #53 by rnewson (2014-06-19 13:39:54+00:00)
Title: Retry if doc is missing

The catch-all clause in remote_doc_handler is the root cause of
missing updates in replication. This occurs when we receive a
{{not_found,missing}, Rev} message instead of the expected {ok, Doc}
message, and causes us to continue blindly on, including writing a
checkpoint.

This patch changes the catch-all clause to one that handles the
missing doc case and causes a retry. Any other response will be a
function_clause which will cause a messier retry.

BugzID: 31722