itinycheng / flink-connector-clickhouse

Flink SQL connector for ClickHouse. Support ClickHouseCatalog and read/write primary data, maps, arrays to clickhouse.
Apache License 2.0
347 stars 149 forks source link

mysql cdc update Exception: There was an error on : Cannot execute replicated DDL query on leader #51

Closed camillelm closed 8 months ago

camillelm commented 1 year ago

update data, Distributed table use-local=true have errors, but local table no errors insert data , Distributed table use-local=true and local table also no errors

e.displayText() = DB::Exception: There was an error on Cannot execute replicated DDL query on leader

at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:59)
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:29)
at ru.yandex.clickhouse.ClickHouseStatementImpl.checkForErrorAndThrow(ClickHouseStatementImpl.java:1094)
at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:773)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeStatement(ClickHouseStatementImpl.java:255)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeBatch(ClickHouseStatementImpl.java:593)
at ru.yandex.clickhouse.ClickHousePreparedStatementImpl.executeBatch(ClickHousePreparedStatementImpl.java:388)
at ru.yandex.clickhouse.ClickHousePreparedStatementImpl.executeBatch(ClickHousePreparedStatementImpl.java:364)
at org.apache.flink.connector.clickhouse.internal.executor.ClickHouseExecutor.attemptExecuteBatch(ClickHouseExecutor.java:53)
at org.apache.flink.connector.clickhouse.internal.executor.ClickHouseUpsertExecutor.executeBatch(ClickHouseUpsertExecutor.java:125)
at org.apache.flink.connector.clickhouse.internal.AbstractClickHouseOutputFormat.checkBeforeFlush(AbstractClickHouseOutputFormat.java:74)
at org.apache.flink.connector.clickhouse.internal.ClickHouseShardOutputFormat.flush(ClickHouseShardOutputFormat.java:160)
at org.apache.flink.connector.clickhouse.internal.ClickHouseShardOutputFormat.flush(ClickHouseShardOutputFormat.java:154)
at org.apache.flink.connector.clickhouse.internal.AbstractClickHouseOutputFormat.lambda$scheduledFlush$0(AbstractClickHouseOutputFormat.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
itinycheng commented 1 year ago

@camillelm Do some breakpoint tests to determine what this SQL is, maybe an alter statement.

camillelm commented 1 year ago

@camillelm Do some breakpoint tests to determine what this SQL is, maybe an alter statement. @itinycheng update data, Distributed table use-local=true have errors, but local table no errors insert data , Distributed table use-local=true and local table also no errors