Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-10140

Throw CatalogException for query "create database if not exist" with sync_ddl as true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 3.2.0
    • Impala 4.0.0
    • Catalog, Frontend
    • None
    • ghx-label-3

    Description

      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.

       

      Attachments

        Activity

          People

            wzhou Wenzhe Zhou
            wzhou Wenzhe Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: