You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "changxin (Jira)" <ji...@apache.org> on 2021/10/12 09:53:00 UTC

[jira] [Created] (IMPALA-10965) Show Crate Table XXX may throw an null pointer exception

changxin created IMPALA-10965:
---------------------------------

             Summary: Show Crate Table XXX may throw an null pointer exception
                 Key: IMPALA-10965
                 URL: https://issues.apache.org/jira/browse/IMPALA-10965
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
            Reporter: changxin
         Attachments: image-2021-10-12-17-12-48-035.png

 
!image-2021-10-12-17-12-48-035.png!
In my test environment, some SQL is running concurrently, but sometimes the "show create table xxx" statement will report a null pointer error, and the stack information is as shown in the figure above.
 
After I checked, I found that the "show create table xxx" statement would get the metadata of the table before Analyze, and then it would run to org.apache.impala.service.JniFrontend.showCreateTable. Between these two operation, if the "invalidate metadata" statement is executed successfully, the cache in ImpaladCatalog will be deleted, and the table obtained in the showCreateTable function is the IncompleteTable type, then the above null pointer error will be reported in ToSqlUtils.getCreateTableSql.
 
There are two ways to reproduce:
1. Frequently execute the "show create table xxx" and "invalidate metadata" statements at the same time.
2. Modify the showCreateTable code to sleep for a period of time before getting the table. Then executing the "show create table xxx" and "invalidate metadata" statements at the same time, due to sleep for a period of time, the probability of the problem will greatly increase.
 
I think we should add a judgment of "table instanceof IncompleteTable" in showCreateTable, and report the error that the metadata may have been deleted instead of reporting a null pointer.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org