juliuszsompolski opened a new pull request #25946: [SPARK-29263] availableSlots 
in resourceOffers can change before being checked by barrier TaskSet
URL: https://github.com/apache/spark/pull/25946
 
 
   ### What changes were proposed in this pull request?
   
   availableSlots are computed before the for loop looping over all TaskSets in 
resourceOffers. But the number of slots changes in every iteration, as in every 
iteration these slots are taken. The number of available slots checked by a 
barrier task set has therefore to be recomputed in every iteration from 
availableCpus.
   
   ### Why are the changes needed?
   
   Bugfix.
   This could make resourceOffer attempt to start a barrier task set, even 
though it has not enough slots available. That would then be caught by the 
`require` in line 519, which will throw an exception, which will get caught and 
ignored by Dispatcher's MessageLoop, so nothing terrible would happen, but the 
exception would prevent resourceOffers from considering further TaskSets.
   Note that launching the barrier TaskSet can still fail if other requirements 
are not satisfied, and still can be rolled-back by throwing exception in this 
`require`. Handling it more gracefully remains a TODO in SPARK-24818, but this 
fix at least should resolve the situation when it's unable to launch because of 
insufficient slots.
   
   ### Does this PR introduce any user-facing change?
   
   No
   
   ### How was this patch tested?
   
   Small bug caught by code inspection. Difficult to test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to