spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zsxwing <>
Subject [GitHub] spark pull request: [SPARK-6468][Block Manager] Fix the race condi...
Date Tue, 24 Mar 2015 11:04:04 GMT
Github user zsxwing commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala ---
    @@ -91,7 +90,12 @@ private[spark] class DiskBlockManager(blockManager: BlockManager, conf:
       /** List all the files currently stored on disk by the disk manager. */
       def getAllFiles(): Seq[File] = {
         // Get all the files inside the array of array of directories
    -    subDirs.flatten.filter(_ != null).flatMap { dir =>
    +    subDirs.flatMap { dir =>
    --- End diff --
    If `a` is not `volatile`,  actually, `a` can be something else. E.g.,
    Thread 1 call `foo`. It creates "foobar" on address 0x1234, then assign 0x1234 to `a`.
However, these update will exist in the current CPU cache, then flush to the memory. It's
possible only `a = 0x1234` has been updated to the memory, but the content in address 0x1234
is still in the current CPU cache. Then Thread 2 may see `a` is  `0x1234` and also see the
old content of address `0x1234`, which is an uninitialized String.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message