Skip to content

Commit

Permalink
Allow no RestConfig when all custom checks are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkGaox committed Nov 3, 2023
1 parent 2f3b0fb commit 29b3709
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ private List<String> batchCustomInstanceStoppableCheck(String clusterId, List<St
return instances;
}
RESTConfig restConfig = _configAccessor.getRESTConfig(clusterId);
if (restConfig == null) {
if (restConfig == null && (
!_skipHealthCheckCategories.contains(StoppableCheck.Category.CUSTOM_INSTANCE_CHECK)
|| !_skipHealthCheckCategories.contains(
StoppableCheck.Category.CUSTOM_PARTITION_CHECK))) {
String errorMessage = String.format(
"The cluster %s hasn't enabled client side health checks yet, "
+ "thus the stoppable check result is inaccurate", clusterId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,6 @@ private void preSetupForParallelInstancesStoppableTest(String clusterName,
clusterConfig.setFaultZoneType("helixZoneId");
clusterConfig.setPersistIntermediateAssignment(true);
_configAccessor.setClusterConfig(clusterName, clusterConfig);
RESTConfig emptyRestConfig = new RESTConfig(clusterName);
_configAccessor.setRESTConfig(clusterName, emptyRestConfig);
// Create instance configs
List<InstanceConfig> instanceConfigs = new ArrayList<>();
for (int i = 0; i < instances.size() - 1; i++) {
Expand Down

0 comments on commit 29b3709

Please sign in to comment.