[
https://issues.apache.org/jira/browse/IMPALA-13226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Quanlong Huang resolved IMPALA-13226.
-------------------------------------
Fix Version/s: Impala 4.5.0
Resolution: Fixed
> TupleCacheInfo unintentionally overwrites Object.finalize()
> -----------------------------------------------------------
>
> Key: IMPALA-13226
> URL: https://issues.apache.org/jira/browse/IMPALA-13226
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Reporter: Quanlong Huang
> Assignee: Quanlong Huang
> Priority: Major
> Fix For: Impala 4.5.0
>
>
> Object.finalize() is called by the JVM garbage collector on an object when
> garbage collection determines that there are no more references to the
> object. A subclass overrides the finalize method to dispose of system
> resources or to perform other cleanup.
> TupleCacheInfo.finalize() is not meant to be used during GC. We'd better use
> another method name to avoid confusion.
> {code:java}
> public void finalize() {
> finalizedHashString_ = hasher_.hash().toString();
> hasher_ = null;
> finalizedHashTrace_ = hashTraceBuilder_.toString();
> hashTraceBuilder_ = null;
> finalized_ = true;
> }{code}
> https://github.com/apache/impala/blob/d83b48cf72fa94ec7f6e55da409b4dff3350543b/fe/src/main/java/org/apache/impala/planner/TupleCacheInfo.java#L157-L163
--
This message was sent by Atlassian Jira
(v8.20.10#820010)