Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14820 )
Change subject: IMPALA-9211: Fix adding new table to stale db due to concurrent reset ...................................................................... IMPALA-9211: Fix adding new table to stale db due to concurrent reset When adding a new table to the catalog, we first get the db object from dbCache and then add the table into it. When doing reset(), i.e. global INVALIDATE METADATA, we replace the whole dbCache with a new one and load db and table names from HMS. These two operations have race conflicts so should both be protected by a exclusive lock, i.e. write lock of version lock. Currently, CatalogServiceCatalog.addTable() does not get the db object within the write lock, which may get a stale db object and add new table into it. This patch moves the operations into the protection of write lock. Tests: - Ran test_concurrent_ddls.py without errors for CreateTable like IMPALA-9135 found. - Ran Core tests Change-Id: I83d2e5f00eabe61a42c948ec1685ce29cdea1592 Reviewed-on: http://gerrit.cloudera.org:8080/14820 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java 2 files changed, 14 insertions(+), 11 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/14820 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I83d2e5f00eabe61a42c948ec1685ce29cdea1592 Gerrit-Change-Number: 14820 Gerrit-PatchSet: 4 Gerrit-Owner: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Vihang Karajgaonkar <vih...@cloudera.com>