Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: "file is not found" outcome while mo init do create view #9424

Closed
1 task done
xzxiong opened this issue May 14, 2023 · 2 comments
Closed
1 task done
Assignees
Labels
kind/tech-request New feature or request needs-triage severity/s1 High impact: Logical errors or data errors that must occur

Comments

@xzxiong
Copy link
Contributor

xzxiong commented May 14, 2023

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 5a565405a
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

#7951 (comment)

第一启动 mo-service,初始化时会报错 file is not found,没有任何 file信息

此时在执行 sql 创建 view system_metrics.sql_statement_total, 依赖的原表为 system_metrics.metric 是一张外表。
注:错误信息,不影响 create view正常结束。

CREATE VIEW IF NOT EXISTS `system_metrics`.`sql_statement_total` as select `collecttime`, `value`, `node`, `role`, `account`, `type`, mo_log_date(`__mo_filepath`) as `log_date`, `__mo_filepath` from `system_metrics`.`metric` where `metric_name` = "sql_statement_total"
2023/05/14 11:16:23.140893 +0800 INFO frontend/session.go:441 session uuid: b4431840-f205-11ed-a0c0-acde48001122 -> background session uuid: b4431cfa-f205-11ed-a0c0-acde48001122
2023/05/14 11:16:23.161791 +0800 INFO frontend/util.go:405 query trace status {"connection_id": 4294967295, "statement": "begin", "status": "success", "span": {"trace_id": "b44606c2-f205-11ed-a0c0-acde48001122", "kind": "statement"}, "session_info": ""}
2023/05/14 11:16:23.162359 +0800 WARN compile/compile.go:2338 compileScope received a malformed cn address '', expected 'ip:port'
2023/05/14 11:16:23.162420 +0800 WARN compile/compile.go:2338 compileScope received a malformed cn address '', expected 'ip:port'
2023/05/14 11:16:23.162727 +0800 WARN compile/compile.go:2338 compileScope received a malformed cn address '', expected 'ip:port'
2023/05/14 11:16:23.162794 +0800 WARN compile/compile.go:2338 compileScope received a malformed cn address '', expected 'ip:port'
2023/05/14 11:16:23.163070 +0800 INFO frontend/util.go:405 query trace status {"connection_id": 4294967295, "statement": "select rp.privilege_id,rp.with_grant_option\n\t\t\t\tfrom mo_catalog.mo_database d, mo_catalog.mo_role_privs rp\n\t\t\t\twhere d.dat_id = rp.obj_id\n\t\t\t\t\tand rp.obj_type = \"database\"\n\t\t\t\t\tand rp.role_id = 0\n\t\t\t\t\tand rp.privilege_id = 21\n\t\t\t\t\tand rp.privilege_level = \"d\"\n\t\t\t\t\tand d.datname = \"system_metrics\"", "status": "success", "span": {"trace_id": "b44655aa-f205-11ed-a0c0-acde48001122", "kind": "statement"}, "session_info": ""}
2023/05/14 11:16:23.163387 +0800 WARN compile/compile.go:2338 compileScope received a malformed cn address '', expected 'ip:port'
2023/05/14 11:16:23.163438 +0800 WARN compile/compile.go:2338 compileScope received a malformed cn address '', expected 'ip:port'
2023/05/14 11:16:23.163670 +0800 INFO frontend/util.go:405 query trace status {"connection_id": 4294967295, "statement": "select rp.privilege_id,rp.with_grant_option\n\t\t\t\tfrom mo_catalog.mo_role_privs rp\n\t\t\t\twhere rp.obj_id = 0\n\t\t\t\t\tand rp.obj_type = \"database\"\n\t\t\t\t\tand rp.role_id = 0\n\t\t\t\t\tand rp.privilege_id = 21\n\t\t\t\t\tand rp.privilege_level = \"*\"", "status": "success", "span": {"trace_id": "b44683ea-f205-11ed-a0c0-acde48001122", "kind": "statement"}, "session_info": ""}
2023/05/14 11:16:23.163772 +0800 INFO frontend/util.go:405 query trace status {"connection_id": 4294967295, "statement": "commit", "status": "success", "span": {"trace_id": "b44699c0-f205-11ed-a0c0-acde48001122", "kind": "statement"}, "session_info": ""}
2023/05/14 11:16:23.165150 +0800 ERROR fileservice/local_etl_fs.go:174 error: file  is not found
github.com/matrixorigin/matrixone/pkg/fileservice.(*LocalETLFS).Read
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/fileservice/local_etl_fs.go:174
github.com/matrixorigin/matrixone/pkg/sql/plan.getExternalStats
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/external.go:191
github.com/matrixorigin/matrixone/pkg/sql/plan.ReCalcNodeStats
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/stats.go:569
github.com/matrixorigin/matrixone/pkg/sql/plan.(*QueryBuilder).appendNode
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/query_builder.go:1775
github.com/matrixorigin/matrixone/pkg/sql/plan.(*QueryBuilder).buildTable
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/query_builder.go:2005
github.com/matrixorigin/matrixone/pkg/sql/plan.(*QueryBuilder).buildTable
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/query_builder.go:2035
github.com/matrixorigin/matrixone/pkg/sql/plan.(*QueryBuilder).buildTable
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/query_builder.go:2015
github.com/matrixorigin/matrixone/pkg/sql/plan.(*QueryBuilder).buildFrom
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/query_builder.go:1794
github.com/matrixorigin/matrixone/pkg/sql/plan.(*QueryBuilder).buildSelect
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/query_builder.go:1389
github.com/matrixorigin/matrixone/pkg/sql/plan.runBuildSelectByBinder
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/build.go:28
github.com/matrixorigin/matrixone/pkg/sql/plan.genViewTableDef
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/build_ddl.go:41
github.com/matrixorigin/matrixone/pkg/sql/plan.buildCreateView
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/build_ddl.go:131
github.com/matrixorigin/matrixone/pkg/sql/plan.BuildPlan
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/build.go:95
github.com/matrixorigin/matrixone/pkg/frontend.buildPlan
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/frontend/mysql_cmd_executor.go:1508
github.com/matrixorigin/matrixone/pkg/frontend.(*TxnComputationWrapper).Compile
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/frontend/computation_wrapper.go:198
github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/frontend/mysql_cmd_executor.go:2793
github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/frontend/internal_executor.go:143
github.com/matrixorigin/matrixone/pkg/util/metric/mometric.initTables.func1
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/util/metric/mometric/metric.go:191
github.com/matrixorigin/matrixone/pkg/util/metric/mometric.initTables
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/util/metric/mometric/metric.go:221
github.com/matrixorigin/matrixone/pkg/util/metric/mometric.InitSchema
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/util/metric/mometric/metric.go:182
github.com/matrixorigin/matrixone/pkg/cnservice.(*service).registerExecutorsLocked.func2
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/cnservice/server_task.go:232
github.com/matrixorigin/matrixone/pkg/taskservice.(*taskRunner).run.func1
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/taskservice/task_runner.go:399
github.com/matrixorigin/matrixone/pkg/common/stopper.(*Stopper).doRunCancelableTask.func1
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/common/stopper/stopper.go:259
2023/05/14 11:16:23.165546 +0800 ERROR disttae/txn_database.go:146 error: SQL parser error: table "sql_statement_total" does not exist {"span": {"trace_id": "b4431bc4-f205-11ed-a0c0-acde48001122", "kind": "statement"}}
github.com/matrixorigin/matrixone/pkg/vm/engine/disttae.(*txnDatabase).Relation
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/vm/engine/disttae/txn_database.go:146
github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).CreateTable
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/ddl.go:464
github.com/matrixorigin/matrixone/pkg/sql/compile.(*Compile).run
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/compile.go:210
github.com/matrixorigin/matrixone/pkg/sql/compile.(*Compile).Run.func1
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/compile.go:263
2023/05/14 11:16:23.165619 +0800 ERROR engine/entire_engine.go:73 error: internal error: temporary engine not init yet {"span": {"trace_id": "b4431bc4-f205-11ed-a0c0-acde48001122", "kind": "statement"}}
github.com/matrixorigin/matrixone/pkg/vm/engine.(*EntireEngine).Database
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/vm/engine/entire_engine.go:73
github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).CreateTable
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/ddl.go:472
github.com/matrixorigin/matrixone/pkg/sql/compile.(*Compile).run
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/compile.go:210
github.com/matrixorigin/matrixone/pkg/sql/compile.(*Compile).Run.func1
	/Users/jacksonxie/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/compile.go:263
2023/05/14 11:16:23.165797 +0800 INFO frontend/util.go:420 time of SendResponse 184ns
2023/05/14 11:16:23.166378 +0800 INFO rpc/handle.go:101 HandleCommit start : 6412075C5B7C4D6DA0342C5222A51139

2023/05/14 11:16:23.166428 +0800 INFO rpc/handle.go:716 [precommit] create relation: {AccountID:0 UserID:0 RoleID:0}, 272426-system_metrics:272429-sql_statement_total
 txn: ctx[6412075C5B7C4D6DA0342C5222A51139][1684034183163818000-0->9223372036854775807-4294967295][Active]: <nil>

2023/05/14 11:16:23.166478 +0800 INFO rpc/handle.go:720 [precommit] create relation end txn: ctx[6412075C5B7C4D6DA0342C5222A51139][1684034183163818000-0->9223372036854775807-4294967295][Active]: <nil>

2023/05/14 11:16:23.187024 +0800 INFO rpc/handle.go:106 HandleCommit end : 6412075C5B7C4D6DA0342C5222A51139, 20.640049ms

2023/05/14 11:16:23.187306 +0800 INFO frontend/util.go:405 query trace status {"connection_id": 74751101, "statement": "CREATE VIEW IF NOT EXISTS `system_metrics`.`sql_statement_total` as select `collecttime`, `value`, `node`, `role`, `account`, `type`, mo_log_date(`__mo_filepath`) as `log_date`, `__mo_filepath` from `system_metrics`.`metric` where `metric_name` = \"sql_statement_total\"", "status": "success", "span": {"trace_id": "b4431bc4-f205-11ed-a0c0-acde48001122", "kind": "statement"}, "session_info": ""}

Expected Behavior

1)错误信息 并不影响执行结果,可以考虑不要 打印;2)错误信息中,应该要有filepath 的信息

Steps to Reproduce

No response

Additional information

No response

@xzxiong xzxiong added kind/bug Something isn't working needs-triage severity/s1 High impact: Logical errors or data errors that must occur labels May 14, 2023
@xzxiong xzxiong added kind/tech-request New feature or request and removed kind/bug Something isn't working labels May 14, 2023
@xzxiong xzxiong changed the title [Bug]: "file is not found" outcome while mo init do create view [Enhancement]: "file is not found" outcome while mo init do create view May 14, 2023
@qingxinhome qingxinhome assigned xzxiong and unassigned qingxinhome May 15, 2023
@qingxinhome
Copy link
Contributor

The issue has been resolved, please verify and close @xzxiong @daviszhen

@xzxiong
Copy link
Contributor Author

xzxiong commented May 15, 2023

checked, error info already fill the filepath info

@xzxiong xzxiong closed this as completed May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/tech-request New feature or request needs-triage severity/s1 High impact: Logical errors or data errors that must occur
Projects
None yet
Development

No branches or pull requests

2 participants