[CELEBORN-446][FOLLOWUP] Check rack should use nextMasterIndex.(#1496)
This commit is contained in:
parent
42219aeb2a
commit
aa817bdbeb
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user