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.92k stars 5.81k forks source link

rollback for bulk copy #46085

Open ricardodcfgh opened 1 year ago

ricardodcfgh commented 1 year ago

【TiDB Environment】Testing 【TiDB Version】5.7.25-TiDB-v7.1.1 【Reproduction Path】Start a transaction, insert data into table A using INSERT, and then use Bulk Copy to insert data into table B. Without committing the transaction, start another transaction to query both table A and table B. 【Encountered Issue】In the uncommitted state, it was found that data was already written into tables A and B. The transaction using ROLLBACK failed to roll back the changes. Manually deleting the large amount of data would be time-consuming. It is desired to improve the compatibility of Bulk Copy to support rollback functionality. Which version of bulk copy can be rolled back in the future?

lance6716 commented 1 year ago

thanks for reaching us. we have planned this feature but currently we don't have a clear target version to release. other customers have also requested this feature and we have started design now.

ricardodcfgh commented 1 year ago

thanks for reaching us. we have planned this feature but currently we don't have a clear target version to release. other customers have also requested this feature and we have started design now.

@lance6716 Do you have a rough plan to go online? We hope to arrange the use of TIDB according to your reply