Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not merge throwable to itself #205

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Do not merge throwable to itself #205

merged 1 commit into from
Nov 30, 2021

Conversation

som-snytt
Copy link
Contributor

See scala/bug#10276

Original issue was OOM, thanks @joroKr21 for suggestion to throw a cached value. Fix by @oxbowlakes

Copy link
Member

@joroKr21 joroKr21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍

Comment on lines +32 to +37
def mkPool(name: String) = {
val parallelism = 1
val handler: Thread.UncaughtExceptionHandler = null
val asyncMode = false
new ForkJoinPool(parallelism, mkFactory(name), handler, asyncMode)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because we can't use named arguments for Java-defined methods? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I believe scalac still complains, although I didn't try again here. Fool me once, as the saying goes.

I actually did this because my first version of the test was this plus throwing on run, but that fails outright and hangs!

@@ -48,4 +53,43 @@ class TaskTest {
val r = c.filter(_ != 0).map(_ + 1)
assertSame(myTs, r.tasksupport)
}

// was: Wrong exception: expected scala.collection.parallel.TaskTest$SpecialControl$1 but was java.lang.IllegalArgumentException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the fix, the assertThrows fails with this message.

@lrytz
Copy link
Member

lrytz commented Nov 30, 2021

Thank you all!

@lrytz lrytz merged commit 36e941d into scala:main Nov 30, 2021
@SethTisue
Copy link
Member

SethTisue commented Nov 30, 2021

Shall I roll a release, or should we wait and see if any other fixes accumulate?

@som-snytt som-snytt deleted the issue/10276 branch November 30, 2021 16:30
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Jan 17, 2025
### What changes were proposed in this pull request?
This pr aims to upgrade `scala-parallel-collections` from 1.0.4 to 1.2.0

### Why are the changes needed?
The new version includes a bug fix for exception merging:

- scala/scala-parallel-collections#205

The full release notes as follows:
- https://github.com/scala/scala-parallel-collections/releases/tag/v1.1.0
- https://github.com/scala/scala-parallel-collections/releases/tag/v1.2.0

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #49548 from LuciferYang/SPARK-50871.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Jan 17, 2025
### What changes were proposed in this pull request?
This pr aims to upgrade `scala-parallel-collections` from 1.0.4 to 1.2.0

### Why are the changes needed?
The new version includes a bug fix for exception merging:

- scala/scala-parallel-collections#205

The full release notes as follows:
- https://github.com/scala/scala-parallel-collections/releases/tag/v1.1.0
- https://github.com/scala/scala-parallel-collections/releases/tag/v1.2.0

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #49548 from LuciferYang/SPARK-50871.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 4e47023)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants