pgandhi999 commented on issue #24072: [SPARK-27112] : Create a resource 
ordering between threads to resolve the deadlocks encountered …
URL: https://github.com/apache/spark/pull/24072#issuecomment-472453452
 
 
    > but this does leave a small race for SPARK-19757, doesn't it? After this 
executes, then an executor gets a task scheduled on it so its no longer idle, 
but you still kill it below? To really prevent that, you'd need to get both 
locks (in the same order of course) so
   > 
   > val response = scheduler.synchronized { this.synchronized {
   
   @squito I did think about this yesterday and tried it out as well; the 
deadlock issue gets fixed alongwith the race, but I was not sure whether doing 
this may or may not cause a performance degradation as a bunch of threads might 
end up busy waiting a lot of time. I can do some perf tests with the above 
change and if it looks good, update the PR with the fix. Will let you know. 
Thank you.
   
   

----------------------------------------------------------------
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