diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2020-02-15 12:27:25 -0500 |
---|---|---|
committer | Nick Vatamaniuc <vatamane@apache.org> | 2020-02-15 12:27:25 -0500 |
commit | ccac76734312430083cd6a4bff4219ff67d65f57 (patch) | |
tree | ba63768a67d5a67a3250ff26b3cc01858919e798 | |
parent | 148af9efadfe97382523c0259171278849186fe9 (diff) | |
download | couchdb-use-transactional-changes-in-indexer-feed.tar.gz |
Use {restart_tx, false} option in view index builder changes feeduse-transactional-changes-in-indexer-feed
Index builder performs writes in the same transaction as the changes
feed so we can't use iterators as they disable writes.
-rw-r--r-- | src/couch_views/src/couch_views_indexer.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couch_views/src/couch_views_indexer.erl b/src/couch_views/src/couch_views_indexer.erl index 75e4b368f..31cd8e6f1 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) -> |