Open frew opened 1 year ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign humengyu2012 for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
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
Code changes
Side effects
Possible that memory usage will change due to free() call removal.
Related changes
None of the above