Author: fdmanana Date: Sun Jul 10 12:07:02 2011 New Revision: 1144842 URL: http://svn.apache.org/viewvc?rev=1144842&view=rev Log: Fix replication task status text
Revision 1144419 added internal timestamps to source database update sequences. These timestamps are being displayed in the replication task status (/_active_tasks/, Futon's Status page) and they shouldn't be because they are an internal detail one, not useful to users and applications. Modified: couchdb/trunk/src/couchdb/couch_replicator.erl Modified: couchdb/trunk/src/couchdb/couch_replicator.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_replicator.erl?rev=1144842&r1=1144841&r2=1144842&view=diff ============================================================================== --- couchdb/trunk/src/couchdb/couch_replicator.erl (original) +++ couchdb/trunk/src/couchdb/couch_replicator.erl Sun Jul 10 12:07:02 2011 @@ -51,7 +51,7 @@ committed_seq, current_through_seq, seqs_in_progress = [], - highest_seq_done = ?LOWEST_SEQ, + highest_seq_done = {0, ?LOWEST_SEQ}, source_log, target_log, rep_starttime, @@ -213,7 +213,7 @@ do_init(#rep{options = Options, id = {Ba target = Target, source_name = SourceName, target_name = TargetName, - start_seq = StartSeq, + start_seq = {_Ts, StartSeq}, source_seq = SourceCurSeq } = State = init_state(Rep), @@ -431,7 +431,7 @@ handle_cast({report_seq_done, Seq, Stats NewHighestDone, SeqsInProgress, NewSeqsInProgress]), SourceCurSeq = source_cur_seq(State), couch_task_status:update( - "Processed ~p / ~p changes", [NewThroughSeq, SourceCurSeq]), + "Processed ~p / ~p changes", [element(2, NewThroughSeq), SourceCurSeq]), NewState = State#rep_state{ stats = sum_stats([Stats, StatsInc]), current_through_seq = NewThroughSeq, @@ -485,7 +485,7 @@ terminate_cleanup(State) -> do_last_checkpoint(#rep_state{seqs_in_progress = [], - highest_seq_done = ?LOWEST_SEQ} = State) -> + highest_seq_done = {_Ts, ?LOWEST_SEQ}} = State) -> {stop, normal, cancel_timer(State)}; do_last_checkpoint(#rep_state{seqs_in_progress = [], highest_seq_done = Seq} = State) -> @@ -530,7 +530,8 @@ init_state(Rep) -> [SourceLog, TargetLog] = find_replication_logs([Source, Target], Rep), {StartSeq0, History} = compare_replication_logs(SourceLog, TargetLog), - StartSeq = get_value(since_seq, Options, StartSeq0), + StartSeq1 = get_value(since_seq, Options, StartSeq0), + StartSeq = {0, StartSeq1}, #doc{body={CheckpointHistory}} = SourceLog, State = #rep_state{ rep_details = Rep, @@ -646,7 +647,7 @@ do_checkpoint(State) -> source = Source, target = Target, history = OldHistory, - start_seq = StartSeq, + start_seq = {_, StartSeq}, current_through_seq = {_Ts, NewSeq} = NewTsSeq, source_log = SourceLog, target_log = TargetLog,