HeartSaVioR commented on issue #25790: [SPARK-29046] Fix NPE in SQLConf.get 
when active SparkContext is stopping
URL: https://github.com/apache/spark/pull/25790#issuecomment-531518131
 
 
   Another possible code of test which don't swap SparkContext:
   
   ```
    test("SPARK-29046: SQLConf.get shouldn't throw NPE when active SparkContext 
is stopping") {
       // Logically, there's only one case SQLConf.get throws NPE: there's 
active SparkContext,
       // but SparkContext is stopping - especially it sets dagScheduler as 
null.
       val dagScheduler = sparkContext.dagScheduler
       Utils.tryWithSafeFinally {
         sparkContext.dagScheduler = null
         SQLConf.get
       } {
         sparkContext.dagScheduler = dagScheduler
       }
   }
   ```
   
   but I wouldn't guarantee the test can be run concurrently with other tests - 
so if possible I'll not update the patch. I'd even suspect how tests have been 
able to run concurrently where we make a change with static val (I meant 
object), but I don't have unlimited bandwidth and there're lots of remaining 
works on me (still have many ideas on SS area, and I've done only first part of 
SPARK-28594) so I'd like to stop putting efforts on this and revisit later when 
my backlog is empty.

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