diff options
author | John Christopher Anderson <jchris@apache.org> | 2008-09-23 20:15:27 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2008-09-23 20:15:27 +0000 |
commit | 9f7381dade1d8a8d1e3209a7c46faea305632d14 (patch) | |
tree | 7cf8d0335ba9c319ec82211b06f1fed41f9a548f /src | |
parent | 9de978cc6a10b0303b7f80b16efd4b6d3cf871fc (diff) |
fix for COUCHDB-119 - replication is incremental between local and remote databases
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@698333 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_rep.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl index 0e172436..2eb59ddb 100644 --- a/src/couchdb/couch_rep.erl +++ b/src/couchdb/couch_rep.erl @@ -110,17 +110,17 @@ replicate2(Source, DbSrc, Target, DbTgt, Options) -> false -> HistEntries =[ { - [{start_time, list_to_binary(StartTime)}, - {end_time, list_to_binary(httpd_util:rfc1123_date())}, - {start_last_seq, SeqNum}, - {end_last_seq, NewSeqNum} | Stats]} + [{<<"start_time">>, list_to_binary(StartTime)}, + {<<"end_time">>, list_to_binary(httpd_util:rfc1123_date())}, + {<<"start_last_seq">>, SeqNum}, + {<<"end_last_seq">>, NewSeqNum} | Stats]} | proplists:get_value("history", OldRepHistoryProps, [])], % something changed, record results NewRepHistory = { - [{session_id, couch_util:new_uuid()}, - {source_last_seq, NewSeqNum}, - {history, lists:sublist(HistEntries, 50)}]}, + [{<<"session_id">>, couch_util:new_uuid()}, + {<<"source_last_seq">>, NewSeqNum}, + {<<"history">>, lists:sublist(HistEntries, 50)}]}, {ok, _} = update_doc(DbSrc, RepRecSrc#doc{body=NewRepHistory}, []), {ok, _} = update_doc(DbTgt, RepRecTgt#doc{body=NewRepHistory}, []), @@ -184,8 +184,8 @@ get_missing_revs_loop(DbTarget, OpenDocsPid, RevsChecked, MissingFound) -> RevsChecked + length(Revs), MissingFound + length(MissingRevs)); {Src, shutdown} -> - Src ! {done, self(), [{missing_checked, RevsChecked}, - {missing_found, MissingFound}]} + Src ! {done, self(), [{<<"missing_checked">>, RevsChecked}, + {<<"missing_found">>, MissingFound}]} end. @@ -200,7 +200,7 @@ open_doc_revs_loop(DbSource, SaveDocsPid, DocsRead) -> SaveDocsPid ! {self(), docs, Docs}, open_doc_revs_loop(DbSource, SaveDocsPid, DocsRead + length(Docs)); {Src, shutdown} -> - Src ! {done, self(), [{docs_read, DocsRead}]} + Src ! {done, self(), [{<<"docs_read">>, DocsRead}]} end. @@ -212,7 +212,7 @@ save_docs_loop(DbTarget, DocsWritten) -> ok = save_docs(DbTarget, Docs, []), save_docs_loop(DbTarget, DocsWritten + length(Docs)); {Src, shutdown} -> - Src ! {done, self(), [{docs_written, DocsWritten}]} + Src ! {done, self(), [{<<"docs_written">>, DocsWritten}]} end. |