diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2020-02-15 12:27:25 -0500 |
---|---|---|
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | 2020-03-02 12:26:22 -0600 |
commit | cad91ad448fead74dd0f0aa83aed8515b865278f (patch) | |
tree | 99a93af89c206802bb1ff6d2fced2fd1ece7fbbc | |
parent | f297fe312b0b416ed875fbd4c62a97d801dd2613 (diff) | |
download | couchdb-cad91ad448fead74dd0f0aa83aed8515b865278f.tar.gz |
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.
-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) -> |