You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2010/10/20 15:46:58 UTC
svn commit: r1025574 - /couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
Author: kocolosk
Date: Wed Oct 20 13:46:57 2010
New Revision: 1025574
URL: http://svn.apache.org/viewvc?rev=1025574&view=rev
Log:
checkpoints reuse session_id. Patch by tilgovi. COUCHDB-704
Modified:
couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
Modified: couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_rep.erl?rev=1025574&r1=1025573&r2=1025574&view=diff
==============================================================================
--- couchdb/branches/1.0.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/1.0.x/src/couchdb/couch_rep.erl Wed Oct 20 13:46:57 2010
@@ -34,6 +34,7 @@
start_seq,
history,
+ session_id,
source_log,
target_log,
rep_starttime,
@@ -189,6 +190,7 @@ do_init([RepId, {PostProps}, UserCtx] =
start_seq = StartSeq,
history = History,
+ session_id = couch_uuids:random(),
source_log = SourceLog,
target_log = TargetLog,
rep_starttime = httpd_util:rfc1123_date(),
@@ -567,6 +569,7 @@ do_checkpoint(State) ->
committed_seq = NewSeqNum,
start_seq = StartSeqNum,
history = OldHistory,
+ session_id = SessionId,
source_log = SourceLog,
target_log = TargetLog,
rep_starttime = ReplicationStartTime,
@@ -578,7 +581,6 @@ do_checkpoint(State) ->
{SrcInstanceStartTime, TgtInstanceStartTime} ->
?LOG_INFO("recording a checkpoint for ~s -> ~s at source update_seq ~p",
[dbname(Source), dbname(Target), NewSeqNum]),
- SessionId = couch_uuids:random(),
NewHistoryEntry = {[
{<<"session_id">>, SessionId},
{<<"start_time">>, list_to_binary(ReplicationStartTime)},