Skip to content

Commit

Permalink
make helix_enabled default to be true
Browse files Browse the repository at this point in the history
  • Loading branch information
mqliang committed Nov 27, 2024
1 parent eec01cc commit 2a90e0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,14 @@ private void updateSegmentMetrics(String tableNameWithType, TableConfig tableCon
offlineSegments.add(segment);
} else if (numEVReplicasUp < numISReplicasUp) {
partialOnlineSegments.add(segment);
} else {
// Do not allow numEVReplicasUp to be larger than numISReplicasUp
numEVReplicasUp = numISReplicasUp;
}

minEVReplicasUp = Math.min(minEVReplicasUp, numEVReplicasUp);
// Total number of replicas in ideal state (including ERROR/OFFLINE states)
int numISReplicasTotal = idealState.getInstanceStateMap(segment).entrySet().size();
int numISReplicasTotal = Math.max(idealState.getInstanceStateMap(segment).entrySet().size(), 1);
minEVReplicasUpPercent = Math.min(minEVReplicasUpPercent, numEVReplicasUp * 100 / numISReplicasTotal);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private ServerInfo getServerInfoOndemand(String instanceId) {
List<String> tags = instanceConfig.getTags();
ZNRecord record = instanceConfig.getRecord();
boolean helixEnabled = record.getBooleanField(
InstanceConfig.InstanceConfigProperty.HELIX_ENABLED.name(), false);
InstanceConfig.InstanceConfigProperty.HELIX_ENABLED.name(), true);
boolean queriesDisabled = record.getBooleanField(CommonConstants.Helix.QUERIES_DISABLED, false);
boolean shutdownInProgress = record.getBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, false);
return new ServerInfo(instanceId, tags, null, helixEnabled, queriesDisabled, shutdownInProgress);
Expand Down

0 comments on commit 2a90e0e

Please sign in to comment.