couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r698333 - /incubator/couchdb/trunk/src/couchdb/couch_rep.erl
Date Tue, 23 Sep 2008 20:15:27 GMT
Author: jchris
Date: Tue Sep 23 13:15:27 2008
New Revision: 698333

URL: http://svn.apache.org/viewvc?rev=698333&view=rev
Log:
fix for COUCHDB-119 - replication is incremental between local and remote databases

Modified:
    incubator/couchdb/trunk/src/couchdb/couch_rep.erl

Modified: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_rep.erl?rev=698333&r1=698332&r2=698333&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_rep.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_rep.erl Tue Sep 23 13:15:27 2008
@@ -110,17 +110,17 @@
     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 @@
                 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 @@
         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 @@
         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.
 
 



Mime
View raw message