Closed YANGGMM closed 1 month ago
use test02; create view v01 as select from test01.sales; show create view v01; select from v01;
use test03; create view v02 as select from test02.v01; show create view v02; select from v02;
这两个表的定义是视图
drop current exists db: test02 drop current exists db: test03
start to restore db: test01
start to drop database: test01
start to create database: test01
start to create pub: test01
start to get table info: datatabse test01
, table `" show full table
test01.sql: show full tables from
test01 show full table
test01., get table number
1" start to restore table: sales start to drop table: sales start to create table: sales, create table sql: CREATE TABLE
sales`
start to insert select table: sales, insert sql:
insert select table: sales, cost: 216.949208ms"
start to restore db: test02,
start to drop database: test02
start to create database: test02
start to create pub: test02"
start to get table info: datatabse test02
, table `" show full table
test02.sql: show full tables from
test02 show full table
test02., get table number
1`
start to restore db: test03
start to drop database: test03
start to create database: test03
start to create pub: test03
start to get table info: datatabse test03
, table `" show full table
test03.sql: show full tables from
test03 show full table
test03., get table number
1`
start to restore view: v01, restore timestamp:
{"level":"ERROR","time":"2024/08/12 18:50:03.444432 +0000","caller":"disttae/txn_database.go:628","msg":"error: SQL parser error: table \"v01\" does not exist","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.444787 +0000","caller":"engine/entire_engine.go:58","msg":"error: internal error: temporary engine not init yet","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.444979 +0000","name":"cn-service","caller":"frontend/compiler_context.go:354","msg":"Failed to get temp database","service":"dd1dccb4-4d3c-41f8-b482-5251dc7a41bf","uuid":"dd1dccb4-4d3c-41f8-b482-5251dc7a41bf","error":"internal error: temporary engine not init yet","session_info":"connectionId 6||{account sys:dump:moadmin -- 0:1:0}|goRoutineId 2129|migrate-goRoutineId 0|019147b6-6513-726f-b692-b9b718dd1365","background":true,"session_id":"019147ec-c75a-754c-8a3f-8db433f0da87","txn_id":"70f70f4866a9b62a17eb0c7cd9daf369","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.445318 +0000","name":"cn-service","caller":"frontend/compiler_context.go:330","msg":"Failed to get table","service":"dd1dccb4-4d3c-41f8-b482-5251dc7a41bf","uuid":"dd1dccb4-4d3c-41f8-b482-5251dc7a41bf","tableName":"v01","error":"SQL parser error: table \"v01\" does not exist","session_info":"connectionId 6||{account sys:dump:moadmin -- 0:1:0}|goRoutineId 2129|migrate-goRoutineId 0|019147b6-6513-726f-b692-b9b718dd1365","background":true,"session_id":"019147ec-c75a-754c-8a3f-8db433f0da87","txn_id":"70f70f4866a9b62a17eb0c7cd9daf369","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.446068 +0000","caller":"disttae/txn_database.go:628","msg":"error: SQL parser error: table \"v01\" does not exist","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.446389 +0000","caller":"engine/entire_engine.go:58","msg":"error: internal error: temporary engine not init yet","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.451956 +0000","caller":"disttae/txn_database.go:628","msg":"error: SQL parser error: table \"v01\" does not exist","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
{"level":"ERROR","time":"2024/08/12 18:50:03.452244 +0000","caller":"engine/entire_engine.go:58","msg":"error: internal error: temporary engine not init yet","span":{"trace_id":"3bb79f9f-9713-daf3-d029-bee19098cab3","span_id":"1750bf8858f1e0de"}}
加了log以后跟失败的log没有区别 start to create view: v01, create view sql: create view v01 as select * from test01.sales; restore view: v01 success
start to create view: v02, create view sql: create view v02 as select * from test02.v01; restore view: v02 success
{"level":"INFO","time":"2024/08/12 18:50:03.438303 +0000","name":"cn-service","caller":"frontend/snapshot.go:803","msg":"[019147ec-f956-7933-9961-e59f792a987e_cluster_level_snapshot_mock] start to restore view: v01, restore timestamp: 1723488584558027020"
{"level":"INFO","time":"2024/08/12 18:49:58.358645 +0000","name":"cn-service","caller":"frontend/snapshot.go:1451","msg":"[cluster_level_snapshot] mock insert snapshot record sql: insert into mo_catalog.mo_snapshots(\n\t\tsnapshot_id,\n\t\tsname,\n\t\tts,\n\t\tlevel,\n\t\taccount_name,\n\t\tdatabase_name,\n\t\ttable_name,\n\t\tobj_id ) values ('019147ec-f956-7933-9961-e59f792a987e', '019147ec-f956-7933-9961-e59f792a987e_cluster_level_snapshot_mock', 1723488584558027020, 'account', 'acc03', '', '', 64);","service":"dd1dccb4-4d3c-41f8-b482-5251dc7a41bf","uuid":"dd1dccb4-4d3c-41f8-b482-5251dc7a41bf"}
还有别的case 挂掉
[select * from view01{snapshot = 'sp06'};] was executed failed, con[id=0, user=dump, ***
2024-08-13 03:59:45 ERROR Executor:201 - [EXPECT RESULT]:
emp_no birth_date first_name last_name gender hire_date
9001 1980-12-17 SMITH CLERK F 2008-12-17
9002 1981-02-20 ALLEN SALESMAN F 2008-02-20
9003 1999-02-20 BOB DOCTOR F 2009-02-20
2024-08-13 03:59:45 ERROR Executor:202 - [ACTUAL RESULT]:
emp_no birth_date first_name last_name gender hire_date
加了log和test 以后定位到快照读有问题
2024-08-13 11:45:47 ERROR Executor:199 - [/home/runner/_work/matrixone/matrixone/head/test/distributed/cases/snapshot/cluster/restore_cluster_table.sql][row:435][select * from test01.sales;] was executed failed, con[id=3, user=acc03:test_account, *** 2024-08-13 11:45:47 ERROR Executor:201 - [EXPECT RESULT]: id sale_date amount 1 2018-12-25 100.00 2 2019-05-15 200.00 3 2020-07-22 150.00 4 2021-08-01 300.00 2024-08-13 11:45:47 ERROR Executor:202 - [ACTUAL RESULT]: id sale_date amount
2024-08-13 12:00:52 ERROR Executor:199 - [/home/runner/_work/matrixone/matrixone/head/test/distributed/cases/snapshot/nonsys_restore_view_to_nonsys_account.sql][row:325][select * from view01{snapshot = 'sp06'};] was executed failed, con[id=1, user=acc01:test_account, *** 2024-08-13 12:00:52 ERROR Executor:201 - [EXPECT RESULT]: emp_no birth_date first_name last_name gender hire_date 9001 1980-12-17 SMITH CLERK F 2008-12-17 9002 1981-02-20 ALLEN SALESMAN F 2008-02-20 9003 1999-02-20 BOB DOCTOR F 2009-02-20 2024-08-13 12:00:52 ERROR Executor:202 - [ACTUAL RESULT]: emp_no birth_date first_name last_name gender hire_date
[/home/runner/_work/matrixone/matrixone/head/test/distributed/cases/snapshot/sys_restore_view_to_sys_account.sql][row:324][select * from partition01 {snapshot = 'sp06'};] was executed failed, con[id=0, user=dump, *** 2024-08-13 12:18:27 ERROR Executor:201 - [EXPECT RESULT]: emp_no birth_date first_name last_name gender hire_date 9001 1980-12-17 SMITH CLERK F 2008-12-17 9002 1981-02-20 ALLEN SALESMAN F 2008-02-20 9003 1999-02-20 BOB DOCTOR F 2009-02-20 2024-08-13 12:18:27 ERROR Executor:202 - [ACTUAL RESULT]: emp_no birth_date first_name last_name gender hire_date
Not working on this
Not working on this
Not working on this
No repro yet recently.
Is there an existing issue for the same bug?
Branch Name
main
Commit ID
newest
Other Environment Information
Actual Behavior
Expected Behavior
No response
Steps to Reproduce
Additional information
No response