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

    https://github.com/apache/spark/pull/21634#discussion_r208693090
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala
 ---
    @@ -504,4 +504,38 @@ class SQLMetricsSuite extends SparkFunSuite with 
SQLMetricsTestUtils with Shared
       test("writing data out metrics with dynamic partition: parquet") {
         testMetricsDynamicPartition("parquet", "parquet", "t1")
       }
    +
    +  test("writing metrics from single thread") {
    +    val nAdds = 10
    +    val acc = new SQLMetric("test", -10)
    +    assert(acc.isZero())
    +    acc.set(0)
    +    for (i <- 1 to nAdds) acc.add(1)
    +    assert(!acc.isZero())
    +    assert(nAdds === acc.value)
    +    acc.reset()
    +    assert(acc.isZero())
    +  }
    +
    +  test("writing metrics from multiple threads") {
    --- End diff --
    
    This was originally raised because an implementation of broadcast join did 
have multiple writers.  Unfortunately we recently determined that the LongAdder 
is causing a performance regression and we are going to revert this.
    @cloud-fan or @hvanhovell can one of you send the rollback PR?


---

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

Reply via email to