You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jiangxb1987 <gi...@git.apache.org> on 2017/05/23 23:23:59 UTC

[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

GitHub user jiangxb1987 opened a pull request:

    https://github.com/apache/spark/pull/18076

    [SPARK-18406][CORE] Race between end-of-task and completion iterator read lock release

    ## What changes were proposed in this pull request?
    
    When a TaskContext is not propagated properly to all child threads for the task, just like the reported cases in this issue, we fail to get to TID from TaskContext and that causes unable to release the lock and assertion failures. To resolve this, we have to explicitly pass the TID value to the `unlock` method.
    
    ## How was this patch tested?
    
    Add new failing regression test case in `RDDSuite`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiangxb1987/spark completion-iterator

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18076.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18076
    
----
commit 740dc1923d75f3980ad3e815d36af0685fe2aaef
Author: Xingbo Jiang <xi...@databricks.com>
Date:   2017-05-23T23:16:57Z

    bugfix

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    **[Test build #77274 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77274/testReport)** for PR 18076 at commit [`72cee6e`](https://github.com/apache/spark/commit/72cee6eee9fd771e0aebc3cfb6fc6e906b67b351).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    LGTM as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/18076


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118144178
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockInfoManager.scala ---
    @@ -281,22 +281,27 @@ private[storage] class BlockInfoManager extends Logging {
     
       /**
        * Release a lock on the given block.
    +   * In case a TaskContext is not propagated properly to all child threads for the task, we fail to
    +   * get the TID from TaskContext, so we have to explicitly pass the TID value to release the lock.
    +   *
    +   * See SPARK-18406 for more discussion of this issue.
        */
    -  def unlock(blockId: BlockId): Unit = synchronized {
    -    logTrace(s"Task $currentTaskAttemptId releasing lock for $blockId")
    +  def unlock(blockId: BlockId, taskAttemptId: Option[TaskAttemptId] = None): Unit = synchronized {
    --- End diff --
    
    if we are going to overwrite it, we should not set a default value for parameters.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    **[Test build #77266 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77266/testReport)** for PR 18076 at commit [`740dc19`](https://github.com/apache/spark/commit/740dc1923d75f3980ad3e815d36af0685fe2aaef).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    **[Test build #77274 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77274/testReport)** for PR 18076 at commit [`72cee6e`](https://github.com/apache/spark/commit/72cee6eee9fd771e0aebc3cfb6fc6e906b67b351).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    cc @JoshRosen @cloud-fan 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118137747
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -713,8 +718,15 @@ private[spark] class BlockManager(
       /**
        * Release a lock on the given block.
        */
    -  def releaseLock(blockId: BlockId): Unit = {
    -    blockInfoManager.unlock(blockId)
    +  def releaseLock(blockId: BlockId): Unit = releaseLock(blockId, taskAttemptId = None)
    --- End diff --
    
    Why do we need to overload here? Why not just have a single `releaseLock` method with a default argument?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    This is a good, clean fix. I left a couple of review comments but they're only minor stylistic comments, not correctness issues.
    
    I checked and it looks like this fixes both occurrences of releasing locks in completion iterators. The only other case that I can think of testing is making sure that `BlockManagerManagedBuffer` doesn't have a similar problem. It might be worth tackling that separately / as a followup after investigation, though, because we currently don't know of problems there and it's going to be pretty complicated to do a deep-dive so we shouldn't block this PR on that investigation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    **[Test build #77278 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77278/testReport)** for PR 18076 at commit [`bc66ec5`](https://github.com/apache/spark/commit/bc66ec52adf0f741a0c533b28ca64e3fef9e848e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77274/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77266/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118137504
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -501,14 +501,18 @@ private[spark] class BlockManager(
           case Some(info) =>
             val level = info.level
             logDebug(s"Level for block $blockId is $level")
    +        val taskAttemptId = Option(TaskContext.get()).map(_.taskAttemptId())
    +          .getOrElse(BlockInfo.NON_TASK_WRITER)
    --- End diff --
    
    I think we can leave out the `.getOrElse` here and just pass in the `Option` itself into `releaseLock`. This helps to avoid exposure of `BlockInfo.NON_TASK_WRITER` here. Not a huge deal but just a minor nit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77278/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118138127
  
    --- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
    @@ -1082,6 +1082,22 @@ class RDDSuite extends SparkFunSuite with SharedSparkContext {
         assert(totalPartitionCount == 10)
       }
     
    +  test("SPARK-18406: race between end-of-task and completion iterator read lock release") {
    +    val rdd = sc.parallelize(1 to 1000, 10)
    +    rdd.cache()
    +
    +    rdd.mapPartitions { iter =>
    +      ThreadUtils.runInNewThread("TestThread") {
    --- End diff --
    
    Nice use of this helper method. I wasn't aware of this, but it's pretty nice. I'll use it in my own tests going forward.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    **[Test build #77278 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77278/testReport)** for PR 18076 at commit [`bc66ec5`](https://github.com/apache/spark/commit/bc66ec52adf0f741a0c533b28ca64e3fef9e848e).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118137650
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -501,14 +501,18 @@ private[spark] class BlockManager(
           case Some(info) =>
             val level = info.level
             logDebug(s"Level for block $blockId is $level")
    +        val taskAttemptId = Option(TaskContext.get()).map(_.taskAttemptId())
    +          .getOrElse(BlockInfo.NON_TASK_WRITER)
             if (level.useMemory && memoryStore.contains(blockId)) {
               val iter: Iterator[Any] = if (level.deserialized) {
                 memoryStore.getValues(blockId).get
               } else {
                 serializerManager.dataDeserializeStream(
                   blockId, memoryStore.getBytes(blockId).get.toInputStream())(info.classTag)
               }
    -          val ci = CompletionIterator[Any, Iterator[Any]](iter, releaseLock(blockId))
    --- End diff --
    
    I'd add a one-line comment before this line which references SPARK-18406, something like
    
    > "We need to capture the current taskId in case the iterator completion is triggered from a different thread which does not have TaskContext set; see SPARK-18406 for discussion"
    
    or similar.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    thanks, merging to master/2.2! @jiangxb1987 can you send a new PR to backport this to branch 2.1 and 2.0? thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18076: [SPARK-18406][CORE] Race between end-of-task and complet...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18076
  
    **[Test build #77266 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77266/testReport)** for PR 18076 at commit [`740dc19`](https://github.com/apache/spark/commit/740dc1923d75f3980ad3e815d36af0685fe2aaef).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118147368
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -713,8 +718,15 @@ private[spark] class BlockManager(
       /**
        * Release a lock on the given block.
        */
    -  def releaseLock(blockId: BlockId): Unit = {
    -    blockInfoManager.unlock(blockId)
    +  def releaseLock(blockId: BlockId): Unit = releaseLock(blockId, taskAttemptId = None)
    --- End diff --
    
    I think there's only one implementation of `BlockDataManager` these days, though? Since that's an internal interface maybe we could change it there, too?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18076: [SPARK-18406][CORE] Race between end-of-task and ...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18076#discussion_r118139724
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -713,8 +718,15 @@ private[spark] class BlockManager(
       /**
        * Release a lock on the given block.
        */
    -  def releaseLock(blockId: BlockId): Unit = {
    -    blockInfoManager.unlock(blockId)
    +  def releaseLock(blockId: BlockId): Unit = releaseLock(blockId, taskAttemptId = None)
    --- End diff --
    
    In fact `BlockManager` extends `BlockDataManager`, so it have to override the `releaseLock(blockId: BlockId)` method, thus we keep this and implement a new method that accepts the new argument `taskAttemptId`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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