You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2016/05/02 20:41:33 UTC

[GitHub] spark pull request: [SPARK-14930][SPARK-13693] Fix race condition ...

Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12712#discussion_r61800432
  
    --- Diff: streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala ---
    @@ -184,8 +184,7 @@ class CheckpointWriter(
       val executor = Executors.newFixedThreadPool(1)
       val compressionCodec = CompressionCodec.createCodec(conf)
       private var stopped = false
    -  private var _fs: FileSystem = _
    -
    +  @volatile private[this] var fs: FileSystem = null
    --- End diff --
    
    minor: `fs` and `latestCheckpointTime` don't need to be `volatile` as we use `Executors.newFixedThreadPool(1)` here. We should also give the thread a name for better debugging.


---
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