mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
HdfsTable.toMinimalTCatalogObject() is not always invoked with holding the table lock, e.g. in invalidating a table, we could replace an HdfsTable instance with an IncompleteTable instance. We then invoke HdfsTable.toMinimalTCatalogObject() to get the removed catalog object. However, the HdfsTable instance could be modified in the meantime by a concurrent DDL/DML that would reload it, e.g. a REFRESH statement. This causes HdfsTable.toMinimalTCatalogObject() failed by ConcurrentModificationException on the column/partition list. This patch fixes the issue by try acquiring the table read lock in HdfsTable.toMinimalTCatalogObject(). If it fails, the partition ids and names won't be returned. Also updates the method to not collecting the column list since it's unused. Tests - Added e2e test - Ran CORE tests Change-Id: Ie9f8e65c0bd24000241eedf8ca765c1e4e14fdb3 Reviewed-on: http://gerrit.cloudera.org:8080/21072 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>