Skip to content

Conversation

@beliefer
Copy link
Contributor

@beliefer beliefer commented Jan 3, 2024

What changes were proposed in this pull request?

This PR propose to remove ThreadLocal due to SecureRandom is thread safe since JDK9.

Why are the changes needed?

Spark already upgraded the JDK version to 17.
Before JDK9, we use ThreadLocal to keep the thread safe for SecureRandom.
There are some javadoc of SecureRandom since JDK9 show below.
屏幕快照 2024-01-03 下午8 11 40

Now, we can remove ThreadLocal due to SecureRandom is thread safe since JDK9.

Does this PR introduce any user-facing change?

'No'.

How was this patch tested?

GA tests.

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

'No'.

@github-actions github-actions bot added the SQL label Jan 3, 2024
@mridulm
Copy link
Contributor

mridulm commented Jan 4, 2024

+CC @srowen, @LuciferYang

@beliefer
Copy link
Contributor Author

beliefer commented Jan 4, 2024

The GA failure is unrelated.
Merged to master. @mridulm @srowen @LuciferYang Thank you!

@dongjoon-hyun
Copy link
Member

It seems that the previous merging failed.

I merged this to master for Apache Spark 4.0.0. Thank you, @beliefer and all.

@beliefer
Copy link
Contributor Author

beliefer commented Jan 4, 2024

@dongjoon-hyun Thank you very much!
I use a new computer and the dev environment seems works bad. I will check my environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants