You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by mi...@apache.org on 2015/06/05 17:00:48 UTC
couch-replicator commit: updated
refs/heads/2707-merge-couch_replicator-fixes-from-cloudant-fork to 7e72e97
Repository: couchdb-couch-replicator
Updated Branches:
refs/heads/2707-merge-couch_replicator-fixes-from-cloudant-fork 39bf72f86 -> 7e72e97c4
[squash] Also check for presence of instance_start_time
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/7e72e97c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/7e72e97c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/7e72e97c
Branch: refs/heads/2707-merge-couch_replicator-fixes-from-cloudant-fork
Commit: 7e72e97c4983aa80f0290d6390ae242e8f441526
Parents: 39bf72f
Author: Mike Wallace <mi...@apache.org>
Authored: Fri Jun 5 15:36:44 2015 +0100
Committer: Mike Wallace <mi...@apache.org>
Committed: Fri Jun 5 15:36:44 2015 +0100
----------------------------------------------------------------------
src/couch_replicator_api_wrap.erl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/7e72e97c/src/couch_replicator_api_wrap.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_api_wrap.erl b/src/couch_replicator_api_wrap.erl
index ef38c73..96947de 100644
--- a/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator_api_wrap.erl
@@ -85,8 +85,12 @@ db_open(#httpdb{} = Db1, _Options, Create) ->
end,
send_req(Db, [{method, get}],
fun(200, _, {Props}) ->
- case get_value(<<"update_seq">>, Props) of
- undefined ->
+ UpdateSeq = get_value(<<"update_seq">>, Props),
+ InstanceStart = get_value(<<"instance_start_time">>, Props),
+ case {UpdateSeq, InstanceStart} of
+ {undefined, _} ->
+ throw({db_not_found, ?l2b(db_uri(Db))});
+ {_, undefined} ->
throw({db_not_found, ?l2b(db_uri(Db))});
_ ->
{ok, Db}