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 "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/01/04 01:40:00 UTC

[jira] [Commented] (IMPALA-8984) Submit several same kudu table created query concurrently may result in table deleted in Kudu storage

    [ https://issues.apache.org/jira/browse/IMPALA-8984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007874#comment-17007874 ] 

ASF subversion and git services commented on IMPALA-8984:
---------------------------------------------------------

Commit 229317af44d11bda20c8fd9de7f91abb3e2920db in impala's branch refs/heads/master from skyyws
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=229317a ]

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 <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Submit several same kudu table created query concurrently may result in table deleted in Kudu storage 
> ------------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-8984
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8984
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.3.0
>            Reporter: WangSheng
>            Assignee: WangSheng
>            Priority: Critical
>
> If the below query submitted several times concurrently, the result could be: All these queries finished, and table created in HMS, but not exists  in kudu storage. I've already found the reason, and I will submit the patch later.
> {code:java}
> create table if not exists test_kudu_table(
>   logDay string,
>   id int,
>   primary key(logDay,id)
> )
> PARTITION BY RANGE (logDay)
> (PARTITION VALUE = '2019-09-20')
> STORED AS KUDU TBLPROPERTIES ('kudu.master_addresses'='master1:7051,master2:7051,master3:7051');{code}



--
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