Skip to content

Commit

Permalink
fix integraiton test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mqliang committed Nov 27, 2024
1 parent eec01cc commit 57e8bdc
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -259,7 +259,9 @@ protected void startServers(int numServers)
throws Exception {
FileUtils.deleteQuietly(new File(TEMP_SERVER_DIR));
for (int i = 0; i < numServers; i++) {
_serverStarters.add(startOneServer(i));
BaseServerStarter serverStarter = startOneServer(i);
_serverStarters.add(serverStarter);
_helixAdmin.enableInstance(getHelixClusterName(), serverStarter.getInstanceId(), true);
}
assertEquals(System.getProperty("user.timezone"), "UTC");
}
Expand Down

0 comments on commit 57e8bdc

Please sign in to comment.