You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2020/02/15 17:46:35 UTC

[couchdb] branch use-transactional-changes-in-indexer-feed created (now ccac767)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch use-transactional-changes-in-indexer-feed
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at ccac767  Use {restart_tx, false} option in view index builder changes feed

This branch includes the following new commits:

     new ccac767  Use {restart_tx, false} option in view index builder changes feed

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: Use {restart_tx, false} option in view index builder changes feed

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch use-transactional-changes-in-indexer-feed
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit ccac76734312430083cd6a4bff4219ff67d65f57
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sat Feb 15 12:27:25 2020 -0500

    Use {restart_tx, false} option in view index builder changes feed
    
    Index builder performs writes in the same transaction as the changes
    feed so we can't use iterators as they disable writes.
---
 src/couch_views/src/couch_views_indexer.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/couch_views/src/couch_views_indexer.erl b/src/couch_views/src/couch_views_indexer.erl
index 75e4b36..31cd8e6 100644
--- a/src/couch_views/src/couch_views_indexer.erl
+++ b/src/couch_views/src/couch_views_indexer.erl
@@ -211,7 +211,8 @@ fold_changes(State) ->
     } = State,
 
     Fun = fun process_changes/2,
-    fabric2_db:fold_changes(TxDb, SinceSeq, Fun, State, [{limit, Limit}]).
+    Opts = [{limit, Limit}, {restart_tx, false}],
+    fabric2_db:fold_changes(TxDb, SinceSeq, Fun, State, Opts).
 
 
 process_changes(Change, Acc) ->