[SPARK-3571] Spark standalone cluster mode doesn't work.

I think, this issue is caused by #1106
I still don't understand what you mean. The behavior we want here is this: for each driver, we start from the position where the last driver left off, and we want to loop through each worker at most once (i.e. we don't want to exit the loop as soon as we have looked at `numWorkersAlive`). If the last driver's last visited index is N, then we still start from N + 1 because we keep track of the position `curPos`. `numWorkersVisited` is a counter, not an index into `shuffledWorkers`. Does that make sense?