Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To achieve this goal, we propose a FIFO physical slot assignment mechanism to SlotPool. With it enabled, the SlotPool tries to fulfill the oldest pending slot request once it receives an available slot, no matter if the slot is . The available slot can be returned by another terminated task or is just offered from a task manager. Currently, a newly offered slot will tend to fulfill the slot request which requested it from the ResourceManager. This naturally ensures that slot requests of an earlier scheduled region will be fulfilled earlier than requests of a later scheduled region. This is different from the current slot assignment mechanism that a newly offered slot will tend to fulfill the slot request which requested it from the ResourceManager.

Note that the fields pendingRequests and waitingForResourceManager store the pending requests in LinkedHashMaps . Therefore, tryFulfillSlotRequestOrMakeAvailable(...) will naturally fulfill the pending requests in inserted order. So we only need to change the slot assignment logic on slot offers. 

...