[jira] [Commented] (SPARK-4714) Checking block is null or not after having gotten info.lock in remove block method

2014-12-08 Thread Josh Rosen (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-4714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14238564#comment-14238564
 ] 

Josh Rosen commented on SPARK-4714:
---

For future reference, I left a big comment explaining this issue over at 
https://github.com/apache/spark/pull/3574#issuecomment-65910884.  

> Checking block is null or not after having gotten info.lock in remove block 
> method
> --
>
> Key: SPARK-4714
> URL: https://issues.apache.org/jira/browse/SPARK-4714
> Project: Spark
>  Issue Type: Improvement
>  Components: Block Manager
>Affects Versions: 1.1.0
>Reporter: SuYan
>Priority: Minor
>
> in removeBlock()/ dropOldBlock()/ dropFromMemory()
> all have the same logic:
> 1. info = blockInfo.get(id)
> 2. if (info != null)
> 3. info.synchronized
> there may be a possibility that while one thread got info.lock while the 
> previous thread already removed from blockinfo in info.lock. 
> but one thing in current code,  That not check info is null or not, while get 
> info.lock to remove block, will not cause any errors. 



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

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



[jira] [Commented] (SPARK-4714) Checking block is null or not after having gotten info.lock in remove block method

2014-12-03 Thread Apache Spark (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-4714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14232717#comment-14232717
 ] 

Apache Spark commented on SPARK-4714:
-

User 'suyanNone' has created a pull request for this issue:
https://github.com/apache/spark/pull/3574

> Checking block is null or not after having gotten info.lock in remove block 
> method
> --
>
> Key: SPARK-4714
> URL: https://issues.apache.org/jira/browse/SPARK-4714
> Project: Spark
>  Issue Type: Improvement
>  Components: Block Manager
>Affects Versions: 1.1.0
>Reporter: SuYan
>Priority: Minor
>
> in removeBlock()/ dropOldBlock()/ dropFromMemory()
> all have the same logic:
> 1. info = blockInfo.get(id)
> 2. if (info != null)
> 3. info.synchronized
> there may be a possibility that while one thread got info.lock while the 
> previous thread already removed from blockinfo in info.lock. 
> but one thing in current code,  That not check info is null or not, while get 
> info.lock to remove block, will not cause any errors. 



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

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