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

[couchdb] branch COUCHDB-3326-clustered-purge-davisp-refactor updated: Fix test failure from test_engine_util:apply_batch/3

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

jiangphcn pushed a commit to branch COUCHDB-3326-clustered-purge-davisp-refactor
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/COUCHDB-3326-clustered-purge-davisp-refactor by this push:
     new b7c40df  Fix test failure from test_engine_util:apply_batch/3
b7c40df is described below

commit b7c40dfdba76e86cbb95fd09c9e1eb6bc8267d5a
Author: jiangphcn <ji...@cn.ibm.com>
AuthorDate: Mon Apr 2 21:14:26 2018 +0800

    Fix test failure from test_engine_util:apply_batch/3
    
       - Fix test failure with below stack
       in function couch_bt_engine:purge_tree_split/1 (src/couch_bt_engine.erl, line 712)
       called as purge_tree_split({<<"3f9e578d59cb2c2da66839a53b000935">>,<<"0001">>,
       [{0,<<119,160,158,229,152,183,85,80,...>>}]})
       in call from couch_btree:'-query_modify/4-fun-0-'/2 (src/couch_btree.erl, line 244)
       in call from lists:map/2 (lists.erl, line 1239)
       in call from couch_btree:query_modify/4 (src/couch_btree.erl, line 242)
       in call from couch_btree:add_remove/3 (src/couch_btree.erl, line 237)
       in call from couch_bt_engine:purge_docs/3 (src/couch_bt_engine.erl, line 469)
       in call from test_engine_util:apply_batch/3 (src/test_engine_util.erl, line 143)
       in call from test_engine_util:apply_actions/3 (src/test_engine_util.erl, line 125)
       **error:function_clause
       output:<<"">>
    
    COUCHDB-3326
---
 src/couch/src/test_engine_util.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/couch/src/test_engine_util.erl b/src/couch/src/test_engine_util.erl
index c7edcbe..8579aa7 100644
--- a/src/couch/src/test_engine_util.erl
+++ b/src/couch/src/test_engine_util.erl
@@ -135,13 +135,14 @@ apply_action(Engine, St, Action) ->
 
 apply_batch(Engine, St, [{purge, {Id, Revs}}]) ->
     UpdateSeq = Engine:get_update_seq(St) + 1,
+    PurgeSeq = Engine:get_purge_seq(St) + 1,
     case gen_write(Engine, St, {purge, {Id, Revs}}, UpdateSeq) of
         {_, _, purged_before}->
             St;
         {Pair, _, {Id, PRevs}} ->
             UUID = couch_uuids:new(),
             {ok, NewSt} = Engine:purge_docs(
-                St, [Pair], [{UUID, Id, PRevs}]),
+                St, [Pair], [{PurgeSeq, UUID, Id, PRevs}]),
             NewSt
     end;
 

-- 
To stop receiving notification emails like this one, please contact
jiangphcn@apache.org.