matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Bug]: mo_cdc: error message optimization #18941

Closed heni02 closed 1 month ago

heni02 commented 1 month ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

a77a7350e

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

以下四个报错信息都是mo_cdc命令table参数的值字符有误,建议报错提示哪个参数的值有错,比如提示table ,source-uri这类关键词,不然很难定位修改命令

企业微信截图_87376b25-c43c-49a9-a911-6be7535562d7 企业微信截图_6bed7306-d6d1-4a6f-b375-b7672722ea8a

其他报错信息也同理

Expected Behavior

No response

Steps to Reproduce

./mo_cdc task create --task-name "cdc_tpcc" --source-uri="mysql://ac1:admin:accountadmin:123@10.222.6.6:6001" --sink-type="mysql" --sink-uri="mysql://dump:111@10.222.1.129:3306"    --tables='tpcc_100.bmsql_config:test_cdc_db.bmsql_config,tpcc_100.bmsql_customer,test_cdc_db:bmsql_customer,tpcc_100.bmsql_district:test_cdc_db.bmsql_district,tpcc_100.bmsql_history:test_cdc_db.bmsql_history,tpcc_100.bmsql_item:test_cdc_db.bmsql_item,tpcc_100.bmsql_new_order:test_cdc_db.bmsql_new_order,tpcc_100.bmsql_oorder:test_cdc_db.bmsql_oorder,tpcc_100.bmsql_order_line:test_cdc_db.bmsql_order_line,tpcc_100.bmsql_stock:test_cdc_db.bmsql_stock,tpcc_100.bmsql_warehouse:test_cdc_db.bmsql_warehouse' --level="account"  --account="ac1"
Error: invalid configuration: create CDC task failed: Error 20101 (HY000): internal error: needs account.database.table or database.table. invalid format.
[root@mo-srv-128 mo-backup]# ./mo_cdc task create --task-name "cdc_tpcc" --source-uri="mysql://ac1:admin:accountadmin:123@10.222.6.6:6001" --sink-type="mysql" --sink-uri="mysql://dump:111@10.222.1.129:3306"    --tables='tpcc_100.bmsql_config:test_cdc_db.bmsql_config,tpcc_100.bmsql_customer:test_cdc_db:bmsql_customer,tpcc_100.bmsql_district:test_cdc_db.bmsql_district,tpcc_100.bmsql_history:test_cdc_db.bmsql_history,tpcc_100.bmsql_item:test_cdc_db.bmsql_item,tpcc_100.bmsql_new_order:test_cdc_db.bmsql_new_order,tpcc_100.bmsql_oorder:test_cdc_db.bmsql_oorder,tpcc_100.bmsql_order_line:test_cdc_db.bmsql_order_line,tpcc_100.bmsql_stock:test_cdc_db.bmsql_stock,tpcc_100.bmsql_warehouse:test_cdc_db.bmsql_warehouse' --level="account"  --account="ac1"
Error: invalid configuration: create CDC task failed: Error 20101 (HY000): internal error: must be source : sink. invalid format

Additional information

No response

heni02 commented 1 month ago

后续新版本验证

heni02 commented 1 month ago

confirm,closed commit:b0855d26f [root@mo-srv-128 mo-backup]# ./mo_cdc task create --task-name "cdc_tpcc" --source-uri="mysql://ac1:admin:accountadmin:111@10.222.6.6:6001" --sink-type="mysql" --sink-uri="mysql://dump:111@10.222.1.129:3306" --tables='tpcc_100.bmsql_config:test_cdc_db.bmsql_config,tpcc_100.bmsql_customer:test_cdc_db:bmsql_customer,tpcc_100.bmsql_district:test_cdc_db.bmsql_district,tpcc_100.bmsql_history:test_cdc_db.bmsql_history,tpcc_100.bmsql_item:test_cdc_db.bmsql_item,tpcc_100.bmsql_new_order:test_cdc_db.bmsql_new_order,tpcc_100.bmsql_oorder:test_cdc_db.bmsql_oorder,tpcc_100.bmsql_order_line:test_cdc_db.bmsql_order_line,tpcc_100.bmsql_stock:test_cdc_db.bmsql_stock,tpcc_100.bmsql_warehouse:test_cdc_db.bmsql_warehouse' --level="account" --account="ac1" Error: invalid configuration: create CDC task failed: Error 20101 (HY000): internal error: invalid table format: tpcc_100.bmsql_customer:test_cdc_db:bmsql_customer, must be source:sink.