Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14736][core] Deadlock in registering applications while the Master is in the RECOVERING mode - #12506
[SPARK-14736][core] Deadlock in registering applications while the Master is in the RECOVERING mode#12506nirandaperera wants to merge 1 commit into
Conversation
…ter is in the RECOVERING mode
mridulm
commented
Apr 19, 2016
You will need to make this thread safe - the applications are added/re-registered from separate threads, right ? |
Maybe we should correct the title just like the others (this is described in https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark). Also, the title looks truncated. |
nirandaperera
commented
Apr 20, 2016
@mridulm do you mean to say, the method |
mridulm
commented
Apr 20, 2016
No. |
@mridulm You are correct. But if we check the register application method, there are similar array buffers which are getting updated without being synchronized. That is why I omitted making the waitingAppsWhileRecovering synchronized. |
mridulm
commented
Apr 21, 2016
No, you are right - this is called only from the event loop - which should ensure thread safety. |
nirandaperera
commented
Apr 22, 2016
Great! can we get this PR merged then? Is there anything else I should do in order to get this merged? |
BryanCutler
commented
Apr 22, 2016
Hi @nirandaperera , I'm not too sure about the Master recovery process so I can't really comment on your code, but it would make a much stronger case for this PR if you could include a test that fails without this change. |
nirandaperera
commented
Apr 25, 2016
@BryanCutler I was looking for some unit tests which could simulate this scenario in the Master.scala class, but I couldn't find any. But i think I can reproduce this in an integration test environment. can you point me to the spark integration tests? |
andrewor14
commented
May 9, 2016
ok to test |
SparkQA
commented
May 9, 2016
Test build #58162 has finished for PR 12506 at commit
|
rxin
commented
May 27, 2016
@andrewor14 did you review this? |
srowen
commented
Jun 12, 2016
Looks reasonable to me but I don't know this code very well. Also @kayousterhout maybe or @squito |
kayousterhout
commented
Jun 13, 2016
@aarondav might be the right person to look at this -- looks like he wrote most of the original code around the "RECOVERING" state way back in 2013. |
squito
commented
Jun 15, 2016
unfortunately I'm not very knowledgeable here either. I agree that this change looks reasonable, but also wish there was a test case for it. I don't think there is any good integration test framework, and it seems there aren't any tests for recovery state now, so you'd have to build that out yourself. One possibility -- "local-cluster" mode is closely related to a standalone cluster -- maybe that could be used to create a test? |
nirandaperera
commented
Jun 16, 2016
@squito hey. Thanks for the heads up. let me check on that and try to come up with a test |
jiangxb1987
commented
Jun 1, 2017
Are you still working on this? @nirandaperera |
# What changes were proposed in this pull request? This PR proposes to close stale PRs, mostly the same instances with apache#18017Closesapache#11459Closesapache#13833Closesapache#13720Closesapache#12506Closesapache#12456Closesapache#12252Closesapache#17689Closesapache#17791Closesapache#18163Closesapache#17640Closesapache#17926Closesapache#18163Closesapache#12506Closesapache#18044Closesapache#14036Closesapache#15831Closesapache#14461Closesapache#17638Closesapache#18222 Added: Closesapache#18045Closesapache#18061Closesapache#18010Closesapache#18041Closesapache#18124Closesapache#18130Closesapache#12217 Added: Closesapache#16291Closesapache#17480Closesapache#14995 Added: Closesapache#12835Closesapache#17141 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18223 from HyukjinKwon/close-stale-prs.
What changes were proposed in this pull request?
this PR fixes the issue SPARK-14736 Deadlock in registering applications while the Master is in the RECOVERING mode.
Proposed solution is to keep the registering apps in a separate list when the Master is in the RECOVERING mode and once the recovery is complete, these apps will be registered back. Pls refer the JIRA for more information
How was this patch tested?
I have tested the patch manually