You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zaki-zhao (via GitHub)" <gi...@apache.org> on 2025/04/17 02:41:56 UTC
[I] [Bug] [Doris Sink] Zeta模式下MySQL CDC到Doris无法自动建表,Doris版本3.0+,且报错 [seatunnel]
zaki-zhao opened a new issue, #9192:
URL: https://github.com/apache/seatunnel/issues/9192
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
Zeta模式下MySQL CDC到Doris无法自动建表,Doris版本3.0+,且报错
### SeaTunnel Version
2.3.10
### SeaTunnel Config
```conf
env {
parallelism = 1
job.mode = "STREAMING"
checkpoint.interval = 10000
}
source {
MySQL-CDC {
base-url = "jdbc:mysql://192.168.121.26:3306/data_api"
username = "root"
database-names=["data_api"]
password = "1234@qwer"
table-pattern="data_api.*"
schema-changes.enabled="true"
server-id = "10086-10186"
startup.mode="INITIAL"
}
}
sink {
Doris {
fenodes = "---"
username = admin
password = "*****"
database = "ms_sync"
table="z_${table_name}"
schema_save_mode="CREATE_SCHEMA_WHEN_NOT_EXIST"
data_save_mode="APPEND_DATA"
sink.enable-delete = "true"
sink.label-prefix = "test1"
sink.max-retries=3
doris.config {
format = "json"
read_json_by_line = "true"
}
}
}
```
### Running Command
```shell
-
```
### Error Exception
```log
worker2 | java.io.IOException: org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error] - [NOT_FOUND]TStatus: errCode = 7, detailMessage = table not found, tableName=z_auth_role
worker2 | at org.apache.seatunnel.connectors.doris.sink.writer.RecordBuffer.stopBufferData(RecordBuffer.java:96) ~[?:?]
worker2 | at org.apache.seatunnel.connectors.doris.sink.writer.RecordStream.endInput(RecordStream.java:41) ~[?:?]
worker2 | at org.apache.seatunnel.connectors.doris.sink.writer.DorisStreamLoad.stopLoad(DorisStreamLoad.java:224) ~[?:?]
worker2 | at org.apache.seatunnel.connectors.doris.sink.writer.DorisSinkWriter.flush(DorisSinkWriter.java:201) ~[?:?]
worker2 | at org.apache.seatunnel.connectors.doris.sink.writer.DorisSinkWriter.close(DorisSinkWriter.java:257) ~[?:?]
worker2 | at org.apache.seatunnel.api.sink.multitablesink.MultiTableSinkWriter.lambda$close$5(MultiTableSinkWriter.java:331) ~[seatunnel-starter.jar:2.3.10]
worker2 | at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597) ~[?:1.8.0_342]
worker2 | at org.apache.seatunnel.api.sink.multitablesink.MultiTableSinkWriter.close(MultiTableSinkWriter.java:328) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.close(SinkFlowLifeCycle.java:174) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.engine.server.task.SeaTunnelTask.lambda$close$5(SeaTunnelTask.java:330) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.api.tracing.MDCConsumer.accept(MDCConsumer.java:43) ~[seatunnel-starter.jar:2.3.10]
worker2 | at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_342]
worker2 | at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0_342]
worker2 | at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_342]
worker2 | at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1870) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ForkJoinPool.externalHelpComplete(ForkJoinPool.java:2467) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ForkJoinTask.externalAwaitDone(ForkJoinTask.java:324) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:405) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734) ~[?:1.8.0_342]
worker2 | at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:1.8.0_342]
worker2 | at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:1.8.0_342]
worker2 | at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:1.8.0_342]
worker2 | at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_342]
worker2 | at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:650) ~[?:1.8.0_342]
worker2 | at org.apache.seatunnel.api.tracing.MDCStream.forEach(MDCStream.java:88) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.engine.server.task.SeaTunnelTask.close(SeaTunnelTask.java:327) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:711) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:1019) ~[seatunnel-starter.jar:2.3.10]
worker2 | at org.apache.seatunnel.api.tracing.MDCRunnable.run(MDCRunnable.java:43) ~[seatunnel-starter.jar:2.3.10]
worker2 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_342]
worker2 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_342]
worker2 | at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342]
worker2 | Caused by: org.apache.seatunnel.connectors.doris.exception.DorisConnectorException: ErrorCode:[Doris-01], ErrorDescription:[stream load error] - [NOT_FOUND]TStatus: errCode = 7, detailMessage = table not found, tableName=z_auth_role
```
### Zeta or Flink or Spark Version
_No response_
### Java or Scala Version
_No response_
### Screenshots
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "zaki-zhao (via GitHub)" <gi...@apache.org>.
zaki-zhao commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-2829143302
> I use doris 2.x and SeaTunnel can create table normally when using `CREATE_SCHEMA_WHEN_NOT_EXIST ` Please provide the clear version of Doris [@zaki-zhao](https://github.com/zaki-zhao) Is there andbody who'd like to find out the root cause? please leave a message
doris version 3.0.3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-2928211004
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-5366242078
Could you share the full job logs (especially any errors during the save-mode/table-creation phase before the stream load), and confirm whether the target table z_auth_role exists in Doris after the failure? The 'table not found' during stream load suggests the auto-create step failed or was skipped earlier.
Please verify the Doris user 'admin' has CREATE privileges on database ms_sync, and confirm the fenodes value points to the FE HTTP port. Also, does the same job work against a Doris 2.x cluster? This would help isolate whether it's a Doris 3.0+ compatibility issue (e.g., default replication/storage settings in the CREATE TABLE template).
If a custom save_mode_create_template is not set, try specifying one explicitly (with properties compatible with Doris 3.0+, e.g., replication_num matching your cluster) and report whether table creation succeeds. Sharing the Doris FE logs around job start time would also help diagnose why CREATE TABLE did not take effect.
<!-- streview-comment:420 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-2824323746
I use doris 2.x and SeaTunnel can create table normally when using `CREATE_SCHEMA_WHEN_NOT_EXIST `
Please provide the clear version of Doris @zaki-zhao
Is there andbody who'd like to find out the root cause? please leave a message
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-2908208410
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-4671709605
Thanks for the report.
After checking the current Doris sink path, this looks closer to a real multi-table / save-mode gap than to a simple Doris 3.0 compatibility issue.
The reason is that the job-side save-mode path is supposed to create missing sink tables before normal writing starts, and the Doris sink does wire `CREATE_SCHEMA_WHEN_NOT_EXIST` into that handler. But the actual failure you posted only appears later when the writer tries to stream-load data and Doris returns `table not found`. That suggests the target table creation path did not really cover this `MySQL-CDC + dynamic target table name` case.
To narrow down where it breaks, we still need two precise pieces of information:
1. did `ms_sync.z_auth_role` already exist before the job started, or was SeaTunnel expected to create it during startup?
2. do the master / worker logs contain any `Creating table ...` save-mode log for `ms_sync.z_auth_role` before the first stream load starts?
Once we have those two points, we can tell whether the miss is happening in the initial save-mode handling or later in the runtime multi-table materialization path.
Also, for future follow-up in this repository, please update the thread in English if possible so more community members can help review it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #9192: [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error.
URL: https://github.com/apache/seatunnel/issues/9192
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-4670125099
Reopening this issue because the problem still looks meaningful and the old close was caused by stale automation, not by a confirmed fix.
If anyone would like to help investigate or implement a fix, this would be a very valuable contribution for CDC + multi-table Doris users, especially on Doris 3.x. A good starting point is the table auto-create path in Zeta mode when `schema_save_mode = CREATE_SCHEMA_WHEN_NOT_EXIST` is used together with MySQL CDC and dynamic table naming.
If you'd like to pick it up, please leave a comment here. Investigation notes, reproduction details, and partial PRs are all welcome. Thank you to every contributor willing to spend time making this path more reliable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-5381239801
Thanks @goutamadwant for tracing this on the current dev branch — that's helpful. Knowing that the current path resolves `z_${table_name}` per discovered source table, creates one Doris sub sink per table, and runs save mode for every sub sink narrows things down, and it matches @DanielLeens's earlier read that this looks like a multi-table / save-mode gap rather than a plain Doris 3.0 compatibility issue.
At this point the investigation is blocked on the startup evidence that both of you asked for. @zaki-zhao, since you reproduced this on Doris 3.0.3, could you please provide:
1. Whether `ms_sync.z_auth_role` already existed in Doris before the job started, or whether SeaTunnel was expected to create it during startup.
2. The Zeta master / worker logs from job startup, specifically whether there is any `Creating table ms_sync.z_auth_role` save-mode log line before the first stream load request that returned `table not found`.
3. If possible, a reproducible Doris 3.0.3 environment or setup steps so we can reproduce the failure directly.
With those we can tell whether the miss is in the initial save-mode handling or in the runtime multi-table materialization path, and avoid changing the shared multi-table code blindly. As noted earlier, please keep follow-ups in English so more community members can help review.
Thanks everyone for keeping this moving — this path matters a lot for CDC + multi-table Doris users on 3.x.
<!-- streview-comment:457 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Doris Sink] In Zeta mode, MySQL CDC cannot automatically create tables in Doris. The Doris version is 3.0+ and there is an error. [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on issue #9192:
URL: https://github.com/apache/seatunnel/issues/9192#issuecomment-5351041437
@zaki-zhao I traced this on the current dev branch before changing the Doris or save mode code
The current path resolves `z_${table_name}` for each discovered source table creates one Doris sub sink per table and runs save mode for every sub sink. The focused Doris create table config and table placeholder tests are passing
The missing part is still the startup evidence requested above. Was `ms_sync.z_auth_role` absent before startup and did the Zeta logs contain `Creating table ms_sync.z_auth_role` before the stream load request
Could you share those logs or a reproducible Doris 3.0.3 environment. This should tell us whether the failure is in save mode or Doris 3.x table creation before changing the shared multi table path
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org