summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dreyfus/src/clouseau_rpc.erl9
-rw-r--r--src/dreyfus/src/dreyfus_index_manager.erl7
2 files changed, 7 insertions, 9 deletions
diff --git a/src/dreyfus/src/clouseau_rpc.erl b/src/dreyfus/src/clouseau_rpc.erl
index 215adaee9..ef48599fc 100644
--- a/src/dreyfus/src/clouseau_rpc.erl
+++ b/src/dreyfus/src/clouseau_rpc.erl
@@ -20,7 +20,7 @@
-export([open_index/3]).
-export([await/2, commit/2, get_update_seq/1, info/1, search/2]).
-export([group1/7, group2/2]).
--export([delete/2, update/3, cleanup/1, cleanup/2, rename/1]).
+-export([delete/2, soft_delete/1, update/3, cleanup/1, cleanup/2]).
-export([analyze/2, version/0, disk_size/1]).
-export([set_purge_seq/2, get_purge_seq/1, get_root_dir/0, close_lru/0, close_lru/1]).
-export([connected/0]).
@@ -78,16 +78,15 @@ group2(Ref, Args) ->
delete(Ref, Id) ->
rpc(Ref, {delete, couch_util:to_binary(Id)}).
+soft_delete(DbName) ->
+ gen_server:cast({cleanup, clouseau()}, {soft_delete, DbName}).
+
update(Ref, Id, Fields) ->
rpc(Ref, {update, Id, Fields}).
cleanup(DbName) ->
gen_server:cast({cleanup, clouseau()}, {cleanup, DbName}).
-rename(DbName) ->
- close_lru(DbName),
- gen_server:cast({cleanup, clouseau()}, {rename, DbName}).
-
cleanup(DbName, ActiveSigs) ->
gen_server:cast({cleanup, clouseau()}, {cleanup, DbName, ActiveSigs}).
diff --git a/src/dreyfus/src/dreyfus_index_manager.erl b/src/dreyfus/src/dreyfus_index_manager.erl
index e0fee5e40..3c66e9c88 100644
--- a/src/dreyfus/src/dreyfus_index_manager.erl
+++ b/src/dreyfus/src/dreyfus_index_manager.erl
@@ -84,8 +84,8 @@ handle_cast({cleanup, DbName}, State) ->
clouseau_rpc:cleanup(DbName),
{noreply, State};
-handle_cast({rename, DbName}, State) ->
- clouseau_rpc:rename(DbName),
+handle_cast({soft_delete, DbName}, State) ->
+ clouseau_rpc:soft_delete(DbName),
{noreply, State}.
handle_info({'EXIT', FromPid, Reason}, State) ->
@@ -123,8 +123,7 @@ handle_db_event(DbName, deleted, _St) ->
"enable_database_recovery", false),
case RecoveryEnabled of
true ->
- clouseau_rpc:close_lru(DbName),
- gen_server:cast(?MODULE, {rename, DbName});
+ gen_server:cast(?MODULE, {soft_delete, DbName});
false ->
gen_server:cast(?MODULE, {cleanup, DbName})
end,