Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'origin/branch-20c' into master

* origin/branch-20c:
  MB-6284: don't touch index pausing API api if we don't need it
  MB-6284: bumped set_vbucket_state_timeout to infinity

Change-Id: I1f68da2be365f6b7a0df70837b4fa60d4ead9127
  • Loading branch information...
commit b194d30fcadef8c51ef41241df32fcf18c9e8095 2 parents 844cfcb + 1d03653
@alk alk authored
View
13 src/capi_set_view_manager.erl
@@ -319,10 +319,11 @@ apply_index_states(SetName, DDocId, Active, Passive, Cleanup,
Replica, ReplicaCleanup, PauseVBuckets, UnpauseVBuckets, UseReplicaIndex) ->
try
- case ns_config_ets_dup:unreliable_read_key(index_pausing_disabled, false) of
- true ->
- ok;
+ PausingOn = cluster_compat_mode:is_index_pausing_on(),
+ case PausingOn of
false ->
+ ok;
+ true ->
ok = ?csv_call(mark_partitions_indexable,
[SetName, DDocId, UnpauseVBuckets])
end,
@@ -342,10 +343,10 @@ apply_index_states(SetName, DDocId, Active, Passive, Cleanup,
ok
end,
- case ns_config_ets_dup:unreliable_read_key(index_pausing_disabled, false) of
- true ->
- ok;
+ case PausingOn of
false ->
+ ok;
+ true ->
ok = ?csv_call(mark_partitions_unindexable,
[SetName, DDocId, PauseVBuckets])
end
View
7 src/cluster_compat_mode.erl
@@ -21,7 +21,8 @@
is_cluster_20/0,
force_compat_version/1, un_force_compat_version/0,
consider_switching_compat_mode/0,
- is_index_aware_rebalance_on/0]).
+ is_index_aware_rebalance_on/0,
+ is_index_pausing_on/0]).
%% NOTE: this is rpc:call-ed by mb_master
-export([supported_compat_version/0]).
@@ -54,6 +55,10 @@ is_index_aware_rebalance_on() ->
Disabled = ns_config_ets_dup:unreliable_read_key(index_aware_rebalance_disabled, false),
(not Disabled) andalso is_enabled([2, 0]).
+is_index_pausing_on() ->
+ is_index_aware_rebalance_on() andalso
+ (not ns_config_ets_dup:unreliable_read_key(index_aware_rebalance_disabled, false)).
+
consider_switching_compat_mode() ->
Config = ns_config:get(),
CurrentVersion = ns_config:search(Config, cluster_compat_version, undefined),
View
2  src/janitor_agent.erl
@@ -26,7 +26,7 @@
-define(PREPARE_REBALANCE_TIMEOUT, ns_config_ets_dup:get_timeout(janitor_agent_prepare_rebalance, 30000)).
--define(SET_VBUCKET_STATE_TIMEOUT, ns_config_ets_dup:get_timeout(janitor_agent_set_vbucket_state, 60000)).
+-define(SET_VBUCKET_STATE_TIMEOUT, infinity).
-define(GET_SRC_DST_REPLICATIONS_TIMEOUT, ns_config_ets_dup:get_timeout(janitor_agent_get_src_dst_replications, 30000)).
Please sign in to comment.
Something went wrong with that request. Please try again.