[
https://issues.apache.org/jira/browse/IMPALA-10140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17192951#comment-17192951
]
ASF subversion and git services commented on IMPALA-10140:
----------------------------------------------------------
Commit 0c89a9d562c280507a6e842898bf3e41cadc3ff1 in impala's branch
refs/heads/master from wzhou-code
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=0c89a9d ]
IMPALA-10140: Fix CatalogExeception for creating database with sync_ddl as true
IMPALA-7961 handle the cases for query "create table if not exists"
with sync_ddl as true. Customers reported similar issue which happened
for query "create database if not exists" with sync_ddl as true.
This patch adds the similar fixing as the fixing for IMPALA-7961 to
function CatalogOpExecutor.createDatabase() to fix the issue.
Testing:
- Manual tests
Since this is a racy bug, I could only reproduce it by forcing
frequent topicUpdateLog GCs along with a specific sequence of
actions, like: run some DDLs and REFRESHs to trigger a GC in
topicUpdateLog, then run query "create database if not exists" with
sync_ddl as true. Verified that the issue couldn't be reproduced
after applying this patch.
- Passed exhaustive test.
Change-Id: Id623118f8938f416414c45d93404fb70d036a9df
Reviewed-on: http://gerrit.cloudera.org:8080/16421
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Throw CatalogException for query "create database if not exist" with sync_ddl
> as true
> -------------------------------------------------------------------------------------
>
> Key: IMPALA-10140
> URL: https://issues.apache.org/jira/browse/IMPALA-10140
> Project: IMPALA
> Issue Type: Bug
> Components: Catalog, Frontend
> Affects Versions: Impala 3.2.0
> Reporter: Wenzhe Zhou
> Assignee: Wenzhe Zhou
> Priority: Critical
>
> Customer faced following error message randomly when running following query
> on impalad version 3.2.0-cdh6.3.2 RELEASE.
> set sync_ddl =true ; create database if not exists $dbname;
> I0715 11:52:28.496253 51943 client-request-state.cc:187]
> a246b430fe450786:81647bd600000000] CatalogException: Couldn't retrieve the
> catalog topic version for the SYNC_DDL operation after 5 attempts.The
> operation has been su
> ccessfully executed but its effects may have not been broadcast to all the
> coordinators.
>
> From the Catalog server log, we can check following error message as well.
> I0715 11:01:50.143303 220286 jni-util.cc:256]
> org.apache.impala.catalog.CatalogException: Couldn't retrieve the catalog
> topic version for the SYNC_DDL operation after 5 attempts.The operation has
> been successfully executed but its effects may have not been broadcast to all
> the coordinators.
> at
> org.apache.impala.catalog.CatalogServiceCatalog.waitForSyncDdlVersion(CatalogServiceCatalog.java:2474)
> at
> org.apache.impala.service.CatalogOpExecutor.execDdlRequest(CatalogOpExecutor.java:374)
> at org.apache.impala.service.JniCatalog.execDdl(JniCatalog.java:154)
> This looks to be another variation of the conditions described in
> IMPALA-7961. But the difference here is that this case is with "CREATE
> DATABASE ... IF NOT EXISTS".
> The fix in IMPALA-7961 specifically targets the "CREATE TABLE ... IF NOT
> EXISTS" use case.
> To fix the issue, we should port the change in patch
> [https://gerrit.cloudera.org/#/c/12428/] to createDatabase() function.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]