couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] 01/05: [SQUERGE] Record all purge infos regardless of effect
Date Fri, 27 Apr 2018 18:27:04 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit e666e7c8efe48497209bd67c7b0bffeb6f3b7550
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
AuthorDate: Fri Apr 27 13:08:31 2018 -0500

    [SQUERGE] Record all purge infos regardless of effect
    
    We need to record all purge info requests even if they don't actually
    remove any revisions. Squerge to implementing the APIs commit
---
 src/couch/src/couch_db_updater.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/couch/src/couch_db_updater.erl b/src/couch/src/couch_db_updater.erl
index 315f737..92b2208 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -121,7 +121,7 @@ handle_call({purge_docs, PurgeReqs0, Options}, _From, Db) ->
     {Pairs, PInfos, Replies} = purge_docs(
             PurgeReqs, DocInfos, UpdateSeq, PurgeSeq, InitAcc),
 
-    Db3 = if Pairs == [] -> Db; true ->
+    Db3 = if Pairs == [] andalso PInfos == [] -> Db; true ->
         {ok, Db1} = couch_db_engine:purge_docs(Db, Pairs, PInfos),
         Db2 = commit_data(Db1),
         ok = gen_server:call(couch_server, {db_updated, Db2}, infinity),

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

Mime
View raw message