couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [03/13] couch commit: updated refs/heads/COUCHDB-3287-pluggable-storage-engines to e4e3a68
Date Mon, 06 Feb 2017 21:59:02 GMT
couch changes fixes


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/be5ed9fb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/be5ed9fb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/be5ed9fb

Branch: refs/heads/COUCHDB-3287-pluggable-storage-engines
Commit: be5ed9fba39cef4e9328446aa4ae8ed083587cd5
Parents: a62978e
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Mon Feb 6 14:41:34 2017 -0600
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Mon Feb 6 14:41:34 2017 -0600

----------------------------------------------------------------------
 src/couch_changes.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/be5ed9fb/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index 9ec34e0..7dfefed 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -572,7 +572,7 @@ can_optimize(_, _) ->
 
 
 send_changes_doc_ids(Db, StartSeq, Dir, Fun, Acc0, {doc_ids, _Style, DocIds}) ->
-    Lookups = couch_db:get_full_doc_infos(Db, DocIds),
+    Results = couch_db:get_full_doc_infos(Db, DocIds),
     FullInfos = lists:foldl(fun
         (#full_doc_info{}=FDI, Acc) -> [FDI | Acc];
         (not_found, Acc) -> Acc
@@ -762,6 +762,8 @@ changes_enumerator(Value0, Acc) ->
     end,
     Results = [Result || Result <- Results0, Result /= null],
     Seq = case Value of
+        #full_doc_info{} ->
+            Value#full_doc_info.update_seq;
         #doc_info{} ->
             Value#doc_info.high_seq;
         {{Seq0, _}, _} ->
@@ -821,6 +823,8 @@ view_changes_row(Results, KVs, Acc) ->
     ] ++ maybe_get_changes_doc({Id, Rev}, Acc)}.
 
 
+changes_row(Results, #full_doc_info{} = FDI, Acc) ->
+    changes_row(Results, couch_doc:to_doc_info(FDI), Acc);
 changes_row(Results, DocInfo, Acc) ->
     #doc_info{
         id = Id, high_seq = Seq, revs = [#rev_info{deleted = Del} | _]


Mime
View raw message