summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-10-20 13:45:31 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-10-20 13:45:31 +0000
commit3880ad954c47e8f05224f768159822b453a35e1f (patch)
tree4d81059ad4439fd552e26a897f2de59357f7d200 /src
parent1965618efd3be32525e068b74ade8cad4b5a001d (diff)
checkpoints reuse session_id. Patch by tilgovi. COUCHDB-704
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1025573 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 a507f81e..ea9a3301 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -40,6 +40,7 @@
start_seq,
history,
+ session_id,
source_log,
target_log,
rep_starttime,
@@ -206,6 +207,7 @@ do_init([RepId, {PostProps} = RepDoc, UserCtx] = InitArgs) ->
start_seq = StartSeq,
history = History,
+ session_id = couch_uuids:random(),
source_log = SourceLog,
target_log = TargetLog,
rep_starttime = httpd_util:rfc1123_date(),
@@ -651,6 +653,7 @@ do_checkpoint(State) ->
committed_seq = NewSeqNum,
start_seq = StartSeqNum,
history = OldHistory,
+ session_id = SessionId,
source_log = SourceLog,
target_log = TargetLog,
rep_starttime = ReplicationStartTime,
@@ -662,7 +665,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)},