Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ protected int getMaxReplicasPerRack(int numReplicas, int numberOfRacks) {

@Override
protected int getRequiredRackCount(int numReplicas) {
return REQUIRED_RACKS;
int racks = networkTopology != null
? networkTopology.getNumOfNodes(networkTopology.getMaxLevel() - 1)
: 1;
return Math.min(REQUIRED_RACKS, racks);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding, this is the only change which fixes the particular issue. I think it would be better to create another refactoring jira, if you want to change the other interfaces.

}
}