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