HeartSaVioR opened a new pull request #25790: [SPARK-29046] Fix NPE in 
SQLConf.get when active SparkContext is stopping
URL: https://github.com/apache/spark/pull/25790
 
 
   ### What changes were proposed in this pull request?
   
   This patch fixes the bug regarding NPE in SQLConf.get, which is only 
possible when SparkContext._dagScheduler is null due to stopping SparkContext. 
The logic doesn't seem to consider active SparkContext could be in progress of 
stopping.
   
   Note that it can't be encountered easily as SparkContext.stop() blocks the 
main thread, but there're many cases which SQLConf.get is accessed concurrently 
while SparkContext.stop() is executing - users run another threads, or listener 
is accessing SQLConf.get after dagScheduler is set to null (this is the case 
what I encountered.)
   
   ### Why are the changes needed?
   
   The bug brings NPE.
   
   ### Does this PR introduce any user-facing change?
   
   No
   
   ### How was this patch tested?
   
   Previous patch #25753 was tested with new UT, and due to disruption with 
other tests in concurrent test run, the test is excluded in this patch.

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