You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/05/23 20:03:18 UTC
[couchdb] branch 3.x updated (a438454ae -> c1c9c90ed)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
from a438454ae Cleanup couch_file exports and unused code
new bc86109ce Remove unused include in fabric.erl
new c1c9c90ed Remove all of the experimental "schemas" functionality from smoosh
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/fabric/src/fabric.erl | 2 --
src/smoosh/src/smoosh_server.erl | 28 ----------------------------
src/smoosh/src/smoosh_utils.erl | 2 --
3 files changed, 32 deletions(-)
[couchdb] 02/02: Remove all of the experimental "schemas" functionality from smoosh
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit c1c9c90ed48db936e1bed3f3ff2fc2b354ea8552
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Mon May 23 14:55:44 2022 -0400
Remove all of the experimental "schemas" functionality from smoosh
---
src/smoosh/src/smoosh_server.erl | 28 ----------------------------
src/smoosh/src/smoosh_utils.erl | 2 --
2 files changed, 30 deletions(-)
diff --git a/src/smoosh/src/smoosh_server.erl b/src/smoosh/src/smoosh_server.erl
index 55c8f61fd..50d80ce37 100644
--- a/src/smoosh/src/smoosh_server.erl
+++ b/src/smoosh/src/smoosh_server.erl
@@ -61,7 +61,6 @@
-record(state, {
db_channels = [],
view_channels = [],
- schema_channels = [],
tab,
event_listener,
waiting = maps:new()
@@ -107,9 +106,6 @@ handle_db_event(DbName, {index_commit, IdxName}, St) ->
handle_db_event(DbName, {index_collator_upgrade, IdxName}, St) ->
smoosh_server:enqueue({DbName, IdxName}),
{ok, St};
-handle_db_event(DbName, {schema_updated, DDocId}, St) ->
- smoosh_server:enqueue({schema, DbName, DDocId}),
- {ok, St};
handle_db_event(_DbName, _Event, St) ->
{ok, St}.
@@ -129,19 +125,11 @@ init([]) ->
ViewChannels = smoosh_utils:split(
config:get("smoosh", "view_channels", "upgrade_views,ratio_views,slack_views")
),
- SchemaChannels = smoosh_utils:split(
- config:get(
- "smoosh",
- "schema_channels",
- "ratio_schemas,slack_schemas"
- )
- ),
Tab = ets:new(channels, [{keypos, #channel.name}]),
{ok,
create_missing_channels(#state{
db_channels = DbChannels,
view_channels = ViewChannels,
- schema_channels = SchemaChannels,
event_listener = Pid,
tab = Tab
})}.
@@ -150,8 +138,6 @@ handle_config_change("smoosh", "db_channels", L, _, _) ->
{ok, gen_server:cast(?MODULE, {new_db_channels, smoosh_utils:split(L)})};
handle_config_change("smoosh", "view_channels", L, _, _) ->
{ok, gen_server:cast(?MODULE, {new_view_channels, smoosh_utils:split(L)})};
-handle_config_change("smoosh", "schema_channels", L, _, _) ->
- {ok, gen_server:cast(?MODULE, {new_schema_channels, smoosh_utils:split(L)})};
handle_config_change(_, _, _, _, _) ->
{ok, nil}.
@@ -207,12 +193,6 @@ handle_cast({new_view_channels, Channels}, State) ->
|| C <- State#state.view_channels -- Channels
],
{noreply, create_missing_channels(State#state{view_channels = Channels})};
-handle_cast({new_schema_channels, Channels}, State) ->
- [
- smoosh_channel:close(channel_pid(State#state.tab, C))
- || C <- State#state.schema_channels -- Channels
- ],
- {noreply, create_missing_channels(State#state{view_channels = Channels})};
handle_cast({enqueue, Object}, State) ->
#state{waiting = Waiting} = State,
case maps:is_key(Object, Waiting) of
@@ -262,7 +242,6 @@ code_change(_OldVsn, {state, DbChannels, ViewChannels, Tab, EventListener, Waiti
{ok, #state{
db_channels = DbChannels,
view_channels = ViewChannels,
- schema_channels = [],
tab = Tab,
event_listener = EventListener,
waiting = Waiting
@@ -303,8 +282,6 @@ enqueue_request(State, Object) ->
smoosh_utils:stringify(Object), Stack])
end.
-find_channel(#state{} = State, {schema, DbName, GroupId}) ->
- find_channel(State#state.tab, State#state.schema_channels, {schema, DbName, GroupId});
find_channel(#state{} = State, {Shard, GroupId}) ->
find_channel(State#state.tab, State#state.view_channels, {Shard, GroupId});
find_channel(#state{} = State, DbName) ->
@@ -346,7 +323,6 @@ channel_pid(Tab, Channel) ->
create_missing_channels(State) ->
create_missing_channels(State#state.tab, State#state.db_channels),
create_missing_channels(State#state.tab, State#state.view_channels),
- create_missing_channels(State#state.tab, State#state.schema_channels),
State.
create_missing_channels(_Tab, []) ->
@@ -469,14 +445,10 @@ get_priority("ratio_dbs") ->
"ratio";
get_priority("ratio_views") ->
"ratio";
-get_priority("ratio_schemas") ->
- "ratio";
get_priority("slack_dbs") ->
"slack";
get_priority("slack_views") ->
"slack";
-get_priority("slack_schemas") ->
- "slack";
get_priority("upgrade_dbs") ->
"upgrade";
get_priority("upgrade_views") ->
diff --git a/src/smoosh/src/smoosh_utils.erl b/src/smoosh/src/smoosh_utils.erl
index 6dd231ce7..354b3df57 100644
--- a/src/smoosh/src/smoosh_utils.erl
+++ b/src/smoosh/src/smoosh_utils.erl
@@ -28,8 +28,6 @@ split(CSV) ->
stringify({DbName, GroupId}) ->
io_lib:format("~s ~s", [DbName, GroupId]);
-stringify({schema, DbName, GroupId}) ->
- io_lib:format("schema: ~s ~s", [DbName, GroupId]);
stringify(DbName) ->
io_lib:format("~s", [DbName]).
[couchdb] 01/02: Remove unused include in fabric.erl
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit bc86109cec30a8d8e7927bc018db8dc575a1ef98
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Mon May 23 14:53:36 2022 -0400
Remove unused include in fabric.erl
As reported by erlang LSP server
---
src/fabric/src/fabric.erl | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/fabric/src/fabric.erl b/src/fabric/src/fabric.erl
index 3e61920e0..6d779d584 100644
--- a/src/fabric/src/fabric.erl
+++ b/src/fabric/src/fabric.erl
@@ -69,8 +69,6 @@
db_uuids/1
]).
--include_lib("fabric/include/fabric.hrl").
-
-type dbname() :: (iodata() | tuple()).
-type docid() :: iodata().
-type revision() :: {integer(), binary()}.