-
Notifications
You must be signed in to change notification settings - Fork 244
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
Remove JDK 1.8 specific functions from tikv-client #2761
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @frew! It looks like this is your first PR to pingcap/tispark 🎉 |
Currently, we don't have a plan to support JDK(>1.8), it's a huge work. |
@xuanyu66 Apologies if I'm missing something, but it seems like this PR makes it work? I've at least compiled TiSpark on JDK 11 with this PR and used it to export >10 TB of data successfully. Am I missing a use case that requires the unsafe free code? |
@frew Thanks for contributing. We will keep an eye on this and find time to do a thorough test |
/run-all-tests |
What problem does this PR solve?
Removes JDK 1.8 specific code.
What is changed and how it works?
Mostly the change doesn't affect functionality - we pull in javax.annotation-api from Maven which should work for both JDK 1.8 and later versions and remove unused code in MemoryUtil.
The one functionality change is removing MemoryUtil.free calls from TiBlockColumnVector and AutoGrowByteBuffer. This will defer buffer removal from the close() call to the finalize() call on the relevant object, but there doesn't appear to be a clean way independent of JDK versions to do this. I've tested some with Spark and it doesn't appear to have a major impact on memory usage.
Check List
Tests
Most changes are verified by compilation passing. Memory changes have been verified by manually running some Spark jobs.
Code changes
Some MemoryUtil methods have been removed, but that's intended to be internal.
Side effects
Possible that memory usage will change due to free() call removal.
Related changes
None of the above