You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Andrew Or (JIRA)" <ji...@apache.org> on 2014/12/03 21:22:12 UTC
[jira] [Closed] (SPARK-4715) ShuffleMemoryManager.tryToAcquire may
return a negative value
[ https://issues.apache.org/jira/browse/SPARK-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Or closed SPARK-4715.
----------------------------
Resolution: Fixed
Fix Version/s: 1.1.2
1.2.0
Target Version/s: 1.2.0, 1.1.2
> ShuffleMemoryManager.tryToAcquire may return a negative value
> -------------------------------------------------------------
>
> Key: SPARK-4715
> URL: https://issues.apache.org/jira/browse/SPARK-4715
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 1.1.0
> Reporter: Shixiong Zhu
> Assignee: Shixiong Zhu
> Fix For: 1.2.0, 1.1.2
>
>
> Here is a unit test to demonstrate it:
> {code}
> test("threads should not be granted a negative size") {
> val manager = new ShuffleMemoryManager(1000L)
> manager.tryToAcquire(700L)
> val latch = new CountDownLatch(1)
> startThread("t1") {
> manager.tryToAcquire(300L)
> latch.countDown()
> }
> latch.await() // Wait until `t1` calls `tryToAcquire`
> val granted = manager.tryToAcquire(300L)
> assert(0 === granted, "granted is negative")
> }
> {code}
> It outputs "0 did not equal -200 granted is negative"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org