summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@gmail.com>2021-04-14 02:03:36 -0400
committerNick Vatamaniuc <nickva@users.noreply.github.com>2021-04-16 17:44:43 -0400
commit3080cf561c1d120a01e418a2acecfaa78dc182d0 (patch)
treecab17df01add1fa64d08d8a742e5e7087726aa44
parent7b83445139a6dc8c4b953a1c5879d8cb8b025fea (diff)
downloadcouchdb-3080cf561c1d120a01e418a2acecfaa78dc182d0.tar.gz
Remove clouseau and dreyfus references from mango
Try to minimize changes and cheated a bit by returning `false` from `is_text_service_available()`. Also keeping in mind that we'd probably want this functionality in the future.
-rw-r--r--src/mango/src/mango_cursor.erl8
-rw-r--r--src/mango/src/mango_idx.erl17
2 files changed, 3 insertions, 22 deletions
diff --git a/src/mango/src/mango_cursor.erl b/src/mango/src/mango_cursor.erl
index 63b449cdc..ed35817e3 100644
--- a/src/mango/src/mango_cursor.erl
+++ b/src/mango/src/mango_cursor.erl
@@ -30,18 +30,10 @@
-include("mango_idx.hrl").
--ifdef(HAVE_DREYFUS).
-define(CURSOR_MODULES, [
mango_cursor_view,
- mango_cursor_text,
mango_cursor_special
]).
--else.
--define(CURSOR_MODULES, [
- mango_cursor_view,
- mango_cursor_special
-]).
--endif.
-define(SUPERVISOR, mango_cursor_sup).
diff --git a/src/mango/src/mango_idx.erl b/src/mango/src/mango_idx.erl
index 37b6e03eb..7108ae684 100644
--- a/src/mango/src/mango_idx.erl
+++ b/src/mango/src/mango_idx.erl
@@ -263,12 +263,7 @@ cursor_mod(#idx{type = <<"json">>}) ->
cursor_mod(#idx{def = all_docs, type= <<"special">>}) ->
mango_cursor_special;
cursor_mod(#idx{type = <<"text">>}) ->
- case clouseau_rpc:connected() of
- true ->
- mango_cursor_text;
- false ->
- ?MANGO_ERROR({index_service_unavailable, <<"text">>})
- end.
+ ?MANGO_ERROR({index_service_unavailable, <<"text">>}).
idx_mod(#idx{type = <<"json">>}) ->
@@ -276,12 +271,7 @@ idx_mod(#idx{type = <<"json">>}) ->
idx_mod(#idx{type = <<"special">>}) ->
mango_idx_special;
idx_mod(#idx{type = <<"text">>}) ->
- case clouseau_rpc:connected() of
- true ->
- mango_idx_text;
- false ->
- ?MANGO_ERROR({index_service_unavailable, <<"text">>})
- end.
+ ?MANGO_ERROR({index_service_unavailable, <<"text">>}).
db_to_name(Name) when is_binary(Name) ->
@@ -318,8 +308,7 @@ get_idx_type(Opts) ->
is_text_service_available() ->
- erlang:function_exported(clouseau_rpc, connected, 0) andalso
- clouseau_rpc:connected().
+ false.
get_idx_ddoc(Idx, Opts) ->