summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-10-20 13:46:57 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-10-20 13:46:57 +0000
commit762e1178afb249b46a3a7a818b44f8be1c4170bd (patch)
treeb568dd9e61cd9bfff537d00d8e24ded96c7e5d65 /src
parent5d0186e008a0d6cdbca0ef37445199fd95bbe559 (diff)
checkpoints reuse session_id. Patch by tilgovi. COUCHDB-704
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1025574 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_rep.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index baf9c87e..28054f34 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -34,6 +34,7 @@
start_seq,
history,
+ session_id,
source_log,
target_log,
rep_starttime,
@@ -189,6 +190,7 @@ do_init([RepId, {PostProps}, UserCtx] = InitArgs) ->
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)},