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

    https://github.com/apache/spark/pull/20382#discussion_r171226477
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/socket.scala
 ---
    @@ -61,13 +68,13 @@ class TextSocketSource(host: String, port: Int, 
includeTimestamp: Boolean, sqlCo
        * Stored in a ListBuffer to facilitate removing committed batches.
        */
       @GuardedBy("this")
    -  protected val batches = new ListBuffer[(String, Timestamp)]
    +  private val batches = new ListBuffer[(String, Timestamp)]
     
       @GuardedBy("this")
    -  protected var currentOffset: LongOffset = new LongOffset(-1)
    +  private[sources] var currentOffset: LongOffset = LongOffset(-1L)
    --- End diff --
    
    this does not make sene. you are directly accessing something that should 
be accessed while synchronized on this.


---

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

Reply via email to