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

[SPARK-19644][SQL] Clean up Scala reflection garbage after creating Encoder (branch-2.2) #19718

Closed
wants to merge 1 commit into from

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Nov 10, 2017

What changes were proposed in this pull request?

Backport #19687 to branch-2.2. The major difference is cleanUpReflectionObjects is protected by ScalaReflectionLock.synchronized in this PR for Scala 2.10.

How was this patch tested?

Jenkins

…ncoder

Because of the memory leak issue in `scala.reflect.api.Types.TypeApi.<:<` (scala/bug#8302), creating an encoder may leak memory.

This PR adds `cleanUpReflectionObjects` to clean up these leaking objects for methods calling `scala.reflect.api.Types.TypeApi.<:<`.

The updated unit tests.

Author: Shixiong Zhu <zsxwing@gmail.com>

Closes apache#19687 from zsxwing/SPARK-19644.
@zsxwing
Copy link
Member Author

zsxwing commented Nov 10, 2017

cc @cloud-fan

@cloud-fan
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Nov 10, 2017

Test build #83702 has finished for PR 19718 at commit 7bff354.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member Author

zsxwing commented Nov 10, 2017

Thanks! Merging to 2.2.

asfgit pushed a commit that referenced this pull request Nov 10, 2017
…ncoder (branch-2.2)

## What changes were proposed in this pull request?

Backport #19687 to branch-2.2. The major difference is `cleanUpReflectionObjects` is protected by `ScalaReflectionLock.synchronized` in this PR for Scala 2.10.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <zsxwing@gmail.com>

Closes #19718 from zsxwing/SPARK-19644-2.2.
@zsxwing zsxwing closed this Nov 10, 2017
@zsxwing zsxwing deleted the SPARK-19644-2.2 branch November 10, 2017 22:15
MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
…ncoder (branch-2.2)

## What changes were proposed in this pull request?

Backport apache#19687 to branch-2.2. The major difference is `cleanUpReflectionObjects` is protected by `ScalaReflectionLock.synchronized` in this PR for Scala 2.10.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <zsxwing@gmail.com>

Closes apache#19718 from zsxwing/SPARK-19644-2.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants