Skip to content

Update ibrowse to 4.2 #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop-2.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ dialyzer_warnings
dialyzer_unhandled_warnings
/.eqc-info
/current_counterexample.eqc
.idea/*
**/*.iml
4 changes: 2 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
{git, "git://github.com/etrepum/kvc.git", {tag, "v1.5.0"}}},
{riak_kv, ".*",
{git, "git://github.com/basho/riak_kv.git", {branch, "develop-2.2"}}},
{ibrowse, "4.0.2",
{git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v4.0.2"}}},
{ibrowse, "4.2",
{git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v4.2"}}},
{fuse, "2.1.0",
{git, "[email protected]:jlouis/fuse.git", {tag, "v2.1.0"}}}
]}.
Expand Down
26 changes: 0 additions & 26 deletions riak_test/yz_startup_shutdown.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ confirm() ->

verify_yz_components_enabled(Cluster),
verify_yz_services_registered(Cluster),
verify_ibrowse_config(Cluster),

verify_node_restart(Cluster),

Expand Down Expand Up @@ -87,31 +86,6 @@ verify_drain_called(Cluster) ->
end,
Results).

%% @private
%% @doc For each node in `Cluster', verify that the ibrowse configuration has
%% been applied.
verify_ibrowse_config([Node1|_] = Cluster) ->
{ResL, []} = rpc:multicall(Cluster, yz_solr, get_ibrowse_config, []),
lists:foreach(
fun(Config) ->
MaxSessions = proplists:get_value(?YZ_SOLR_MAX_SESSIONS, Config),
MaxPipelineSize = proplists:get_value(?YZ_SOLR_MAX_PIPELINE_SIZE, Config),
?assertEqual(MaxSessions, ?MAX_SESSIONS),
?assertEqual(MaxPipelineSize, ?MAX_PIPELINE_SIZE)
end,
ResL),

%% Now verify setting these config values programmatically...
NewMaxSessions = 42,
NewMaxPipelineSize = 64,
ok = rpc:call(Node1, yz_solr, set_ibrowse_config,
[[{?YZ_SOLR_MAX_SESSIONS, NewMaxSessions},
{?YZ_SOLR_MAX_PIPELINE_SIZE, NewMaxPipelineSize}]]),
NewConfig = rpc:call(Node1, yz_solr, get_ibrowse_config, []),
?assertEqual(NewMaxSessions, proplists:get_value(?YZ_SOLR_MAX_SESSIONS, NewConfig)),
?assertEqual(NewMaxPipelineSize,
proplists:get_value(?YZ_SOLR_MAX_PIPELINE_SIZE, NewConfig)).

%% @private
%% @doc Restart one node in `Cluster' and verify that it is properly excluded
%% from query coverage plans and index operations until it is fully restarted and
Expand Down
14 changes: 0 additions & 14 deletions src/yz_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ start(_StartType, _StartArgs) ->
Enabled = ?YZ_ENABLED,
case yz_sup:start_link(Enabled) of
{ok, Pid} ->
_ = application:set_env(ibrowse, inactivity_timeout, 600000),
maybe_setup(Enabled),

%% Now everything is started, permit usage by KV/query
Expand Down Expand Up @@ -140,7 +139,6 @@ maybe_setup(true) ->
ok = riak_core:register(yokozuna, [{bucket_validator, yz_bucket_validator}]),
ok = riak_core:register(search, [{permissions, ['query',admin]}]),
ok = yz_schema:setup_schema_bucket(),
ok = set_ibrowse_config(),
ok.

%% @doc Conditionally register PB service IFF Riak Search is not
Expand All @@ -165,15 +163,3 @@ setup_stats() ->
false -> sidejob:new_resource(yz_stat_sj, yz_stat_worker, 10000)
end,
ok = riak_core:register(yokozuna, [{stat_mod, yz_stat}]).

set_ibrowse_config() ->
Config = [{?YZ_SOLR_MAX_SESSIONS,
app_helper:get_env(?YZ_APP_NAME,
?YZ_CONFIG_IBROWSE_MAX_SESSIONS,
?YZ_CONFIG_IBROWSE_MAX_SESSIONS_DEFAULT)},
{?YZ_SOLR_MAX_PIPELINE_SIZE,
app_helper:get_env(?YZ_APP_NAME,
?YZ_CONFIG_IBROWSE_MAX_PIPELINE_SIZE,
?YZ_CONFIG_IBROWSE_MAX_PIPELINE_SIZE_DEFAULT)}
],
yz_solr:set_ibrowse_config(Config).