couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r820852 - in /couchdb/branches/0.10.x: ./ etc/default/couchdb src/couchdb/couch_rep_changes_feed.erl src/couchdb/couch_rep_reader.erl
Date Fri, 02 Oct 2009 00:31:08 GMT
Author: kocolosk
Date: Fri Oct  2 00:31:08 2009
New Revision: 820852

URL: http://svn.apache.org/viewvc?rev=820852&view=rev
Log:
merge replication fixes for COUCHDB-516 (r820851)

Modified:
    couchdb/branches/0.10.x/   (props changed)
    couchdb/branches/0.10.x/etc/default/couchdb   (props changed)
    couchdb/branches/0.10.x/src/couchdb/couch_rep_changes_feed.erl
    couchdb/branches/0.10.x/src/couchdb/couch_rep_reader.erl

Propchange: couchdb/branches/0.10.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct  2 00:31:08 2009
@@ -3,4 +3,4 @@
 /couchdb/branches/form:729440-730015
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
-/couchdb/trunk:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495
+/couchdb/trunk:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495,820851

Propchange: couchdb/branches/0.10.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct  2 00:31:08 2009
@@ -3,5 +3,5 @@
 /couchdb/branches/form/etc/default/couchdb:729440-730015
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
-/couchdb/trunk/etc/default/couchdb:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817277-817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495
+/couchdb/trunk/etc/default/couchdb:806983,807208-807478,807771,808574,808632,808716,808876,809134,809977,810015,810028,810350,810358,810435,811910,813803,815921,817277-817278,817398,817400,817403,817749,817793,818249,818357,819091,819341,819343,819436,819799,819977,820344,820469,820495,820851
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/0.10.x/src/couchdb/couch_rep_changes_feed.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.10.x/src/couchdb/couch_rep_changes_feed.erl?rev=820852&r1=820851&r2=820852&view=diff
==============================================================================
--- couchdb/branches/0.10.x/src/couchdb/couch_rep_changes_feed.erl (original)
+++ couchdb/branches/0.10.x/src/couchdb/couch_rep_changes_feed.erl Fri Oct  2 00:31:08 2009
@@ -298,7 +298,7 @@
     end, 0, Rows),
     by_seq_loop(Server, Source, EndSeq).
 
-decode_row(<<",\n", Rest/binary>>) ->
+decode_row(<<",", Rest/binary>>) ->
     decode_row(Rest);
 decode_row(Row) ->
     {Props} = ?JSON_DECODE(Row),

Modified: couchdb/branches/0.10.x/src/couchdb/couch_rep_reader.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.10.x/src/couchdb/couch_rep_reader.erl?rev=820852&r1=820851&r2=820852&view=diff
==============================================================================
--- couchdb/branches/0.10.x/src/couchdb/couch_rep_reader.erl (original)
+++ couchdb/branches/0.10.x/src/couchdb/couch_rep_reader.erl Fri Oct  2 00:31:08 2009
@@ -32,7 +32,7 @@
     source,
     missing_revs,
     reader_loop,
-    reader_from = nil,
+    reader_from = [],
     count = 0,
     docs = queue:new(),
     reply_to = nil,
@@ -107,7 +107,7 @@
     if NewState#state.count < ?BUFFER_SIZE ->
         {reply, ok, NewState};
     true ->
-        {noreply, NewState#state{reader_from=From}}
+        {noreply, NewState#state{reader_from=[From|State#state.reader_from]}}
     end;
 handle_add_docs(Seq, DocsToAdd, _From, #state{count=0} = State) ->
     NewState = update_sequence_lists(Seq, State),
@@ -126,10 +126,8 @@
         reader_from = ReaderFrom,
         docs = Docs
     } = State,
-    if ReaderFrom =/= nil ->
-        gen_server:reply(ReaderFrom, ok);
-    true -> ok end,
-    NewState = State#state{count=0, reader_from=nil, docs=queue:new()},
+    [gen_server:reply(F, ok) || F <- ReaderFrom],
+    NewState = State#state{count=0, reader_from=[], docs=queue:new()},
     {reply, {calculate_new_high_seq(State), queue:to_list(Docs)}, NewState}.
 
 handle_open_remote_doc(Id, Seq, Revs, From, #state{monitor_count=N} = State)



Mime
View raw message