You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2018/03/01 19:44:34 UTC
[couchdb] 01/01: Remove unused code for starting compactions
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch pse-remove-unused-notify-option
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 59c0f1127b9f90a79cf3ba4b7275c8f19e573f59
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Mar 1 13:43:33 2018 -0600
Remove unused code for starting compactions
This was left over from an earlier attempt at being a bit more strict on
removing access to the #db record. Its not used as is obvious by the
fact that the 2-arity version isn't even exported from the module.
---
src/couch/src/couch_db.erl | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/src/couch/src/couch_db.erl b/src/couch/src/couch_db.erl
index 2ea94b9..93ea07e 100644
--- a/src/couch/src/couch_db.erl
+++ b/src/couch/src/couch_db.erl
@@ -224,18 +224,7 @@ monitor(#db{main_pid=MainPid}) ->
erlang:monitor(process, MainPid).
start_compact(#db{} = Db) ->
- start_compact(Db, []).
-
-start_compact(#db{} = Db, Opts) ->
- case lists:keyfind(notify, 1, Opts) of
- {notify, Pid, Term} ->
- % We fake a gen_server call here which sends the
- % response back to the specified pid.
- Db#db.main_pid ! {'$gen_call', {Pid, Term}, start_compact},
- ok;
- _ ->
- gen_server:call(Db#db.main_pid, start_compact)
- end.
+ gen_server:call(Db#db.main_pid, start_compact).
cancel_compact(#db{main_pid=Pid}) ->
gen_server:call(Pid, cancel_compact).
--
To stop receiving notification emails like this one, please contact
davisp@apache.org.