You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2016/01/11 11:30:39 UTC

[jira] [Resolved] (SPARK-6616) IsStopped set to true in before stop() is complete.

     [ https://issues.apache.org/jira/browse/SPARK-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved SPARK-6616.
------------------------------
    Resolution: Not A Problem

I think this was obsoleted by subsequent changes that made this more thread-safe.

> IsStopped set to true in before stop() is complete.
> ---------------------------------------------------
>
>                 Key: SPARK-6616
>                 URL: https://issues.apache.org/jira/browse/SPARK-6616
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 1.3.0
>            Reporter: Ilya Ganelin
>
> There are numerous instances throughout the code base of the following:
> {code}
> if (!stopped) {
>     stopped = true
>     ...
> }
> {code}
> In general, this is bad practice since it can cause an incomplete cleanup if there is an error during shutdown and not all code executes. Incomplete cleanup is harder to track down than a double cleanup that triggers some error. I propose fixing this throughout the code, starting with the cleanup sequence with {code}SparkContext.stop() {code}
> A cursory examination reveals this in {code}SparkContext.stop(), SparkEnv.stop(), and ContextCleaner.stop() {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org