Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14319 )

Change subject: IMPALA-8984: Fix race condition in creating Kudu table
......................................................................

IMPALA-8984: Fix race condition in creating Kudu table

This patch fixes the race condition when using 'CREATE IF NOT EXISTS'
to create the same managed kudu table in parallel. Note that it won't
happend if Kudu-HMS integration is enable. The bug would cause the
table being deleted in Kudu but reserving in HMS.

The solution is adding check for HMS table existence before creating
it in HMS and after obtaining 'metastoreDdlLock_'. If the HMS table is
created by other concurrent threads, just return as
'Table already exists'. So we don't fail in creating the HMS table and
won't rollback the creation of kudu table.

Tests:
  * Add custom cluster test test_concurrent_kudu_create.py
  * Ran all front-end tests

Change-Id: I1a4047bcdaa6b346765b96e8c36bb747a2b0091d
Reviewed-on: http://gerrit.cloudera.org:8080/14319
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/service/CatalogOpExecutor.java
M fe/src/main/java/org/apache/impala/service/KuduCatalogOpExecutor.java
A tests/custom_cluster/test_concurrent_kudu_create.py
3 files changed, 101 insertions(+), 22 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/14319
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1a4047bcdaa6b346765b96e8c36bb747a2b0091d
Gerrit-Change-Number: 14319
Gerrit-PatchSet: 22
Gerrit-Owner: wangsheng <sky...@163.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>
Gerrit-Reviewer: wangsheng <sky...@163.com>

Reply via email to