Quanlong Huang created IMPALA-13226:
---------------------------------------

             Summary: 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


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)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to