This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch fix/984/view-keep-update-seq-after-compact in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit df7fd474c11758c95877fc96e0099fbbd0e9253e Author: Jan Lehnardt <[email protected]> AuthorDate: Fri Jul 13 13:39:28 2018 +0200 Views now retain update_seq after compaction. Previously on view compaction, the new index state would not carry over the associated database update sequence. As a result, views who were compacted at least once could no longer use the ?update_seq query option. We also copy over purge_seq and options now. Closes #984 --- src/couch_mrview/src/couch_mrview_compactor.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/couch_mrview/src/couch_mrview_compactor.erl b/src/couch_mrview/src/couch_mrview_compactor.erl index e9be89c..f20f415 100644 --- a/src/couch_mrview/src/couch_mrview_compactor.erl +++ b/src/couch_mrview/src/couch_mrview_compactor.erl @@ -233,6 +233,9 @@ compact_view(#mrview{id_num=VID}=View, EmptyView, BufferSize, Acc0) -> {EmptyView#mrview{btree=NewBt, seq_btree=NewSeqBt, + update_seq=View#mrview.update_seq, + purge_seq=View#mrview.purge_seq, + options=View#mrview.options, key_byseq_btree=NewKeyBySeqBt}, FinalAcc}. compact_view_btree(Btree, EmptyBtree, VID, BufferSize, Acc0) ->
