Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

make sure to pass seq_indexed info to the view record.

  • Loading branch information...
commit 8b9f63abe498f04eb4ffc6b6e7ed1d2f1b8b092a 1 parent 634a6a9
Benoit Chesneau authored July 04, 2012
4  apps/couch_mrview/src/couch_mrview_updater.erl
@@ -93,8 +93,8 @@ purge(_Db, PurgeSeq, PurgedIdRevs, State) ->
93 93
           case dict:find(Num, KeysToRem) of
94 94
             {ok, RemKeys} ->
95 95
                 {ok, Btree2} = couch_btree:add_remove(Btree, [], RemKeys),
96  
-                {ok, SBtree2} = case SeqIndexed of
97  
-                    true ->
  96
+                {ok, SBtree2} = case SBtree of
  97
+                    nil ->
98 98
                         {ok, nil};
99 99
                     _ ->
100 100
                         {ok, RemSKeys} = dict:find(Num, SKeysToRem),
4  apps/couch_mrview/src/couch_mrview_util.erl
@@ -82,7 +82,8 @@ ddoc_to_mrst(DbName, #doc{id=Id, body={Fields}}) ->
82 82
                         RedFuns = [{Name, RedSrc} | View#mrview.reduce_funs],
83 83
                         {View#mrview.map_names, RedFuns}
84 84
                 end,
85  
-                View2 = View#mrview{map_names=MapNames,reduce_funs=RedSrcs},
  85
+                View2 = View#mrview{seq_indexed=SeqIndexed,
  86
+                                    map_names=MapNames,reduce_funs=RedSrcs},
86 87
                 dict:store({MapSrc, ViewOpts}, View2, DictBySrcAcc);
87 88
             undefined ->
88 89
                 DictBySrcAcc
@@ -603,6 +604,7 @@ reset_state(State) ->
603 604
         qserver=nil,
604 605
         update_seq=0,
605 606
         id_btree=nil,
  607
+        seq_btree=nil,
606 608
         views=[View#mrview{btree=nil, seq_btree=nil} || View <- State#mrst.views]
607 609
     }.
608 610
 

0 notes on commit 8b9f63a

Please sign in to comment.
Something went wrong with that request. Please try again.