Uh oh!
There was an error while loading. Please reload this page.
[SPARK-6860][Streaming][WebUI] Fix the possible inconsistency of StreamingPage - #5470
[SPARK-6860][Streaming][WebUI] Fix the possible inconsistency of StreamingPage#5470zsxwing wants to merge 2 commits into
Conversation
…obProgressListener when creating the content
srowen
commented
Apr 11, 2015
That makes some sense. It depends on the methods that mutate the listener also being synchronized on the object. It looks like they are, at a glance, but have you looked into that a bit? |
SparkQA
commented
Apr 11, 2015
Test build #30076 has finished for PR 5470 at commit
|
zsxwing
commented
Apr 11, 2015
Thank you for reminding me. Some public methods of |
SparkQA
commented
Apr 11, 2015
Test build #30081 has finished for PR 5470 at commit
|
srowen
commented
Apr 12, 2015
LGTM. The first commit fixes a problem that would indeed in rare cases cause the page to display an inconsistent view of the state, which is probably minor but still bad. The second synchronizes access to mutable data structures that were inconsistently synchronized. |
zsxwing
commented
Apr 15, 2015
@srowen, do you think if this one should be merged to branch 1.3? |
srowen
commented
Apr 15, 2015
I would back-port if anyone felt strongly about it; it seems like a theoretical and cosmetic problem, so didn't seem high priority. |
zsxwing
commented
Apr 15, 2015
Fair. If necessary, I would help send a back-port pull request. |
srowen
commented
Apr 15, 2015
Meh, I'll just back port it. It's low risk. |
…amingPage Because `StreamingPage.render` doesn't hold the `listener` lock when generating the content, the different parts of content may have some inconsistent values if `listener` updates its status at the same time. And it will confuse people. This PR added `listener.synchronized` to make sure we have a consistent view of StreamingJobProgressListener when creating the content. Author: zsxwing <zsxwing@gmail.com> Closes#5470 from zsxwing/SPARK-6860 and squashes the following commits: cec6f92 [zsxwing] Add missing 'synchronized' in StreamingJobProgressListener 7182498 [zsxwing] Add synchronized to make sure we have a consistent view of StreamingJobProgressListener when creating the content
Because
StreamingPage.renderdoesn't hold thelistenerlock when generating the content, the different parts of content may have some inconsistent values iflistenerupdates its status at the same time. And it will confuse people.This PR added
listener.synchronizedto make sure we have a consistent view of StreamingJobProgressListener when creating the content.