This is an automated email from the ASF dual-hosted git repository.
ethanfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new aa817bdbe [CELEBORN-446][FOLLOWUP] Check rack should use
nextMasterIndex.(#1496)
aa817bdbe is described below
commit aa817bdbebdd5346050ee722eefdf9919aa0eab5
Author: Angerszhuuuu <[email protected]>
AuthorDate: Thu May 18 16:25:14 2023 +0800
[CELEBORN-446][FOLLOWUP] Check rack should use nextMasterIndex.(#1496)
---
.../org/apache/celeborn/service/deploy/master/SlotsAllocator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/master/src/main/java/org/apache/celeborn/service/deploy/master/SlotsAllocator.java
b/master/src/main/java/org/apache/celeborn/service/deploy/master/SlotsAllocator.java
index 12330ce7d..715335881 100644
---
a/master/src/main/java/org/apache/celeborn/service/deploy/master/SlotsAllocator.java
+++
b/master/src/main/java/org/apache/celeborn/service/deploy/master/SlotsAllocator.java
@@ -224,7 +224,7 @@ public class SlotsAllocator {
int nextSlaveInd = (nextMasterInd + 1) % workers.size();
if (restrictions != null) {
while (!haveUsableSlots(restrictions, workers, nextSlaveInd)
- || !satisfyRackAware(shouldRackAware, workers, masterIndex,
nextSlaveInd)) {
+ || !satisfyRackAware(shouldRackAware, workers, nextMasterInd,
nextSlaveInd)) {
nextSlaveInd = (nextSlaveInd + 1) % workers.size();
if (nextSlaveInd == nextMasterInd) {
break outer;
@@ -233,7 +233,7 @@ public class SlotsAllocator {
storageInfo =
getStorageInfo(workers, nextSlaveInd, restrictions,
workerDiskIndexForSlave);
} else if (shouldRackAware) {
- while (!satisfyRackAware(true, workers, masterIndex, nextSlaveInd)) {
+ while (!satisfyRackAware(true, workers, nextMasterInd,
nextSlaveInd)) {
nextSlaveInd = (nextSlaveInd + 1) % workers.size();
if (nextSlaveInd == nextMasterInd) {
break outer;