From 11d769d4316ee781a9cd302080f66f35c12338e8 Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Thu, 22 Oct 2015 09:08:51 +0900 Subject: [PATCH] Put a cap on list objects v1 --- include/list_objects.hrl | 1 - riak_test/tests/list_objects_test.erl | 37 --------------------------- src/riak_cs_config.erl | 7 ++--- src/riak_cs_list_objects_utils.erl | 3 +-- 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 riak_test/tests/list_objects_test.erl diff --git a/include/list_objects.hrl b/include/list_objects.hrl index 9c5ff7dac..ec5b6e8cc 100644 --- a/include/list_objects.hrl +++ b/include/list_objects.hrl @@ -101,4 +101,3 @@ -define(MIN_KEYS_TO_CACHE, 2000). -define(MAX_CACHE_BYTES, 104857600). % 100MB -define(KEY_LIST_MULTIPLIER, 1.1). --define(FOLD_OBJECTS_FOR_LIST_KEYS, true). diff --git a/riak_test/tests/list_objects_test.erl b/riak_test/tests/list_objects_test.erl deleted file mode 100644 index c38072731..000000000 --- a/riak_test/tests/list_objects_test.erl +++ /dev/null @@ -1,37 +0,0 @@ -%% --------------------------------------------------------------------- -%% -%% Copyright (c) 2007-2013 Basho Technologies, Inc. All Rights Reserved. -%% -%% This file is provided to you under the Apache License, -%% Version 2.0 (the "License"); you may not use this file -%% except in compliance with the License. You may obtain -%% a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, -%% software distributed under the License is distributed on an -%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -%% KIND, either express or implied. See the License for the -%% specific language governing permissions and limitations -%% under the License. -%% -%% --------------------------------------------------------------------- - --module(list_objects_test). - -%% @doc Integration test for list the contents of a bucket - --export([confirm/0]). --include_lib("eunit/include/eunit.hrl"). - --define(TEST_BUCKET, "riak-test-bucket"). - -confirm() -> - rtcs:set_conf(cs, [{"fold_objects_for_list_keys", "off"}]), - {UserConfig, {_RiakNodes, CSNodes, _Stanchion}} = rtcs:setup(1), - assert_v1(CSNodes), - list_objects_test_helper:test(UserConfig). - -assert_v1(CSNodes) -> - false =:= rpc:call(hd(CSNodes), riak_cs_list_objects_utils, fold_objects_for_list_keys, []). diff --git a/src/riak_cs_config.erl b/src/riak_cs_config.erl index d1b7a1026..d55a3860d 100644 --- a/src/riak_cs_config.erl +++ b/src/riak_cs_config.erl @@ -127,9 +127,6 @@ warnings() -> ?MAYBE_WARN(anonymous_user_creation(), "`anonymous_user_creation` is set as true. Set this as false" " when this CS nodes is populated as public service."), - ?MAYBE_WARN(not gc_paginated_indexes(), - "`gc_paginated_indexes` is set as false. " - " This will be removed at next major version."), ok. %% =================================================================== @@ -232,10 +229,10 @@ policy_module() -> %% @doc paginated 2i is supported after Riak 1.4 %% When using Riak CS `>= 1.5' with Riak `=< 1.3' (it rarely happens) -%% this should be set as false at app.config. +%% this should be set as false at app.config. Deprecated in 2.1. -spec gc_paginated_indexes() -> atom(). gc_paginated_indexes() -> - get_env(riak_cs, gc_paginated_indexes, true). + true. -spec response_module() -> atom(). response_module() -> diff --git a/src/riak_cs_list_objects_utils.erl b/src/riak_cs_list_objects_utils.erl index 3c7a96802..e153207c3 100644 --- a/src/riak_cs_list_objects_utils.erl +++ b/src/riak_cs_list_objects_utils.erl @@ -228,8 +228,7 @@ set_key_list_multiplier(Multiplier) -> -spec fold_objects_for_list_keys() -> boolean(). fold_objects_for_list_keys() -> - riak_cs_config:get_env(riak_cs, fold_objects_for_list_keys, - ?FOLD_OBJECTS_FOR_LIST_KEYS). + true. -spec fold_objects_timeout() -> non_neg_integer(). fold_objects_timeout() ->