pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.89k stars 5.81k forks source link

online ddl, batch update cause exception #25816

Open f756692193 opened 3 years ago

f756692193 commented 3 years ago

General Question

The situation is: 2 production programs batchly update multi tidb tables and simultaneously do online-ddl instructions,which updates multiple columns and every column is set a default value. That leads to the two programs reporting different errors. First error:Information schema is changed during the execution of the statement(for example, table definition may be updated by other DDL ran in parallel). If you see this error often, try increasing tidb_max_delta_schema_count. [try again later]。According to official documents, that's because the updating dml is invovled with multiple table names. The second one: org.apache.beam.sdk.util.UserCodeException: java.sql.BatchUpdateException: information of column xxx.xxx.xxx is not found I'm curious about why the second error is different from the first one?

ljluestc commented 1 year ago

"org.apache.beam.sdk.util.UserCodeException: java.sql.BatchUpdateException: information of column xxx.xxx.xxx is not found" Error:

This error seems to be related to a specific column not being found during a batch update operation. It could be caused by the column being dropped or renamed during the batch update process. Review the SQL code of the batch update to ensure that the column names are correct and haven't been altered by other DDL operations. Check the timing of DDL and DML operations to ensure they are not conflicting with each other.

f756692193 commented 1 year ago

您好! 您的信我已收到,谢谢!

f756692193 commented 7 months ago

您好! 您的信我已收到,谢谢!