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 a19ef1da9d6f0fdc39d9b8d249bb9225a37b01a8 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 and purge sequences. As a result, views who were compacted at least once could no longer use the ?update_seq query option, or purge properly. Closes #984 --- src/couch_mrview/src/couch_mrview_compactor.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/couch_mrview/src/couch_mrview_compactor.erl b/src/couch_mrview/src/couch_mrview_compactor.erl index e9be89c..3ef1180 100644 --- a/src/couch_mrview/src/couch_mrview_compactor.erl +++ b/src/couch_mrview/src/couch_mrview_compactor.erl @@ -233,6 +233,8 @@ 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, key_byseq_btree=NewKeyBySeqBt}, FinalAcc}. compact_view_btree(Btree, EmptyBtree, VID, BufferSize, Acc0) ->
