From 6b18f276e79a3e384bda8c1a5ef0c7d0a92a25b1 Mon Sep 17 00:00:00 2001 From: Fred Dushin Date: Tue, 12 Jul 2016 10:22:28 -0400 Subject: [PATCH 1/3] Updated ibrowse dependency to v4.2 --- rebar.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebar.config b/rebar.config index 00de9870..ada6a21b 100644 --- a/rebar.config +++ b/rebar.config @@ -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, "git@github.com:jlouis/fuse.git", {tag, "v2.1.0"}}} ]}. From bbd09fefb074bc24efad266689fe87462fb8ccc3 Mon Sep 17 00:00:00 2001 From: Fred Dushin Date: Tue, 12 Jul 2016 10:59:47 -0400 Subject: [PATCH 2/3] Removed the explicit ibrowse settings we make in the code. Some of these settings were made in 2.0.7 to work around some issues we discovered with the pipelining code in ibrowse-4.0.1, which may no longer be relevant. We still need to do some performance and resource testing to be sure, before merging this change in. There is another change in this commit to remove the inactivity_timeout setting that @rzezeski had added. With the line not removed with this version of ibrowse, search requests time out after 60 seconds (default). See https://github.com/basho/yokozuna/commit/b02c0bd with @rzezeski's rationale for adding this line. We need to understand whether TIME_WAITs are still an issue in this version of ibrowse without this setting. --- src/yz_app.erl | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/yz_app.erl b/src/yz_app.erl index a00f7d53..15693100 100644 --- a/src/yz_app.erl +++ b/src/yz_app.erl @@ -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 @@ -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 @@ -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). From 7a47346c23354dfca9316bce477922c7b82fffe9 Mon Sep 17 00:00:00 2001 From: Fred Dushin Date: Tue, 12 Jul 2016 14:13:53 -0400 Subject: [PATCH 3/3] Removed test for default ibrowse configuration from the test. --- .gitignore | 2 ++ riak_test/yz_startup_shutdown.erl | 26 -------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 2ce6aeb9..7dadd391 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ dialyzer_warnings dialyzer_unhandled_warnings /.eqc-info /current_counterexample.eqc +.idea/* +**/*.iml diff --git a/riak_test/yz_startup_shutdown.erl b/riak_test/yz_startup_shutdown.erl index 45d97aea..dd465e21 100644 --- a/riak_test/yz_startup_shutdown.erl +++ b/riak_test/yz_startup_shutdown.erl @@ -21,7 +21,6 @@ confirm() -> verify_yz_components_enabled(Cluster), verify_yz_services_registered(Cluster), - verify_ibrowse_config(Cluster), verify_node_restart(Cluster), @@ -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