Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/21072
Change subject: WIP IMPALA-12831: Fix HdfsTable.toMinimalTCatalogObject() failed by concurrent modification ...................................................................... WIP IMPALA-12831: Fix HdfsTable.toMinimalTCatalogObject() failed by concurrent modification 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 - Add e2e test Change-Id: Ie9f8e65c0bd24000241eedf8ca765c1e4e14fdb3 --- M fe/src/main/java/org/apache/impala/catalog/HdfsTable.java M fe/src/main/java/org/apache/impala/catalog/Table.java M tests/custom_cluster/test_concurrent_ddls.py 3 files changed, 68 insertions(+), 15 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/21072/1 -- To view, visit http://gerrit.cloudera.org:8080/21072 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9f8e65c0bd24000241eedf8ca765c1e4e14fdb3 Gerrit-Change-Number: 21072 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
