Shixiong Zhu created SPARK-6468: ----------------------------------- Summary: Fix the race condition of subDirs in DiskBlockManager Key: SPARK-6468 URL: https://issues.apache.org/jira/browse/SPARK-6468 Project: Spark Issue Type: Bug Components: Block Manager Affects Versions: 1.3.0 Reporter: Shixiong Zhu Priority: Minor
There are two race conditions of subDirs in DiskBlockManager: 1. `getAllFiles` does not use correct locks to read the contents in `subDirs`. Although it's designed for testing, it's still worth to add correct locks to eliminate the race condition. 2. The double-check has a race condition in `getFile(filename: String)`. If a thread finds `subDirs(dirId)(subDirId)` is not null out of the `synchronized` block, it may not be able to see the correct content of the File instance pointed by `subDirs(dirId)(subDirId)` according to the Java memory model (there is no volatile variable here). -- 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