matrixorigin / matrixone

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

[Bug]: restore report table "mo_foreign_keys" does not exist. #16262

Closed Ariznawlll closed 4 months ago

Ariznawlll commented 4 months ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

fae5807be9d8c1a3ba862d522498f036de6a37f2

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

偶现:

image

log: wl.log

Expected Behavior

restore successfully.

Steps to Reproduce

1. load tpcc 10 warehouse data
2. mysql -h 127.0.0.1 -P 6001 -udump -p111
   create snapshot sp_01 for account sys;
3. 在mo-tpcc工具下跑10-10测试;
4. mysql -h 127.0.0.1 -P 6001 -udump -p111
   create snapshot sp02 for account sys;
5. 在mo-tpcc工具下跑10-10测试;
6. restore account sys from snaoshot sp_01;

Additional information

No response

YANGGMM commented 4 months ago
mysql> create snapshot sp_01 for account sys;
Query OK, 0 rows affected (0.04 sec)

run tpcc test

image
mysql> restore account sys from snapshot sp_01;
ERROR 1062 (HY000): Duplicate entry '1' for key 'hist_id'
mysql> 
mysql> 
mysql> restore account sys from snapshot sp_01;
ERROR 1062 (HY000): Duplicate entry '1' for key 'hist_id'
mysql> 
mysql> 
mysql> 
mysql> restore account sys from snapshot sp_01;
ERROR 1062 (HY000): Duplicate entry '16385' for key 'hist_id'

无法复现,等 #16100 解决之后再看

YANGGMM commented 4 months ago

无法复现,等 https://github.com/matrixorigin/matrixone/issues/16100 解决之后再看

YANGGMM commented 4 months ago

无法复现,等 https://github.com/matrixorigin/matrixone/issues/16100 解决之后再看

YANGGMM commented 4 months ago

16100 已经解决,麻烦再测一下,@Ariznawlll

Ariznawlll commented 4 months ago

等pr 16567合进去我再测

Ariznawlll commented 4 months ago

commit: 09c4d95dcdc615e1ea924239ff72af8c7863e286

create database tpcc;
use tpcc;
建表:https://github.com/matrixorigin/mo-tpcc/blob/main/sql/tableCreates.sql

load 数据:

创建快照:create snapshot sp01 for account sys;

本地:git clone https://github.com/matrixorigin/mo-tpcc.git
执行tpcc 10-100测试:./runBenchmark props.mo

连接mo: mysql -h 127.0.0.1 -P 6001 -udump -p111

restore account sys database tpcc from snapshot sp01;
image

测试通过.