Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix view seq rettrieving

  • Loading branch information...
commit e1394edc2fcfb6b7178b38e8cd3011a0d902f4aa 1 parent e3374a6
@benoitc benoitc authored
Showing with 9 additions and 5 deletions.
  1. +9 −5 apps/couch_replicator/src/couch_replicator.erl
View
14 apps/couch_replicator/src/couch_replicator.erl
@@ -913,15 +913,19 @@ source_cur_seq(#rep_state{source = #httpdb{} = Db, type = view} = State) ->
#rep_state{rep_details = Rep, source_seq = Seq} = State,
case (catch couch_replicator_api_wrap:get_view_seq(Db#httpdb{retries = 3},
Rep)) of
- {ok, {Info}} ->
- get_value(<<"last_seq">>, Info, Seq);
+ {ok, LastSeq} ->
+ LastSeq;
_ ->
Seq
end;
source_cur_seq(#rep_state{source = Db, type = view} = State) ->
- #rep_state{rep_details = Rep} = State,
- {ok, LastSeq} = couch_replicator_api_wrap:get_view_seq(Db, Rep),
- LastSeq;
+ #rep_state{rep_details = Rep, source_seq = Seq} = State,
+ case catch(couch_replicator_api_wrap:get_view_seq(Db, Rep)) of
+ {ok, LastSeq} ->
+ LastSeq;
+ _ ->
+ Seq
+ end;
source_cur_seq(#rep_state{source = #httpdb{} = Db, source_seq = Seq}) ->
case (catch couch_replicator_api_wrap:get_db_info(Db#httpdb{retries = 3})) of
{ok, Info} ->
Please sign in to comment.
Something went wrong with that request. Please try again.