spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shixiong Zhu (JIRA)" <>
Subject [jira] [Created] (SPARK-4715) ShuffleMemoryManager.tryToAcquire may return a negative value
Date Wed, 03 Dec 2014 07:59:12 GMT
Shixiong Zhu created SPARK-4715:

             Summary: ShuffleMemoryManager.tryToAcquire may return a negative value
                 Key: SPARK-4715
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
            Reporter: Shixiong Zhu

Here is a unit test to demonstrate it:

  test("threads should not be granted a negative size") {
    val manager = new ShuffleMemoryManager(1000L)

    val latch = new CountDownLatch(1)
    startThread("t1") {
    latch.await() // Wait until `t1` calls `tryToAcquire`

    val granted = manager.tryToAcquire(300L)
    assert(0 === granted, "granted is negative")

It outputs "0 did not equal -200 granted is negative"

This message was sent by Atlassian JIRA

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

View raw message