You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2018/07/13 15:09:04 UTC

[couchdb] branch fix/984/view-keep-update-seq-after-compact updated (3cc9932 -> df7fd47)

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

jan pushed a change to branch fix/984/view-keep-update-seq-after-compact
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    omit 3cc9932  Views now retain update_seq after compaction.
     new df7fd47  Views now retain update_seq after compaction.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3cc9932)
            \
             N -- N -- N   refs/heads/fix/984/view-keep-update-seq-after-compact (df7fd47)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 src/couch_mrview/src/couch_mrview_compactor.erl | 2 ++
 1 file changed, 2 insertions(+)


[couchdb] 01/01: Views now retain update_seq after compaction.

Posted by ja...@apache.org.
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 <ja...@apache.org>
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) ->