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

[Bug]: CI/multi cn e2e run bvt load data LOCAL infile got FileNotFoundException #16383

Closed
1 task done
xzxiong opened this issue May 24, 2024 · 8 comments
Closed
1 task done
Assignees
Labels
kind/bug Something isn't working kind/test-ci resolved/v1.2.1 severity/s1 High impact: Logical errors or data errors that must occur
Milestone

Comments

@xzxiong
Copy link
Contributor

xzxiong commented May 24, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

212f82a

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
看起来 参数应该协程 $GITHUB_WORKSPACE/test/distributed/resources 才对?

  • Standlone CI 是OK的
企业微信截图_eb858627-7729-42cf-bd20-fd663ed7481a

https://github.com/matrixorigin/matrixone/actions/runs/9208910754/job/25332186175
企业微信截图_80a91e5d-6e7b-4920-98fd-d791c202bf03

2024-05-23 15:48:59 ERROR Executor:267 - [/home/runner/work/matrixone/matrixone/test/distributed/cases/log/query_tcp.sql][row:76][load data local infile '$resources/external_table_file/rawlog_withnull.csv' into table rawlog_withnull fields terminated by ',' enclosed by '\"' lines terminated by '\n';] was executed failed, con[id=1, user=bvt_query_tcp:admin:accountadmin, ***
2024-05-23 15:48:59 ERROR Executor:269 - [EXPECT RESULT]:
null
2024-05-23 15:48:59 ERROR Executor:270 - [ACTUAL RESULT]:
Unable to open file '/test/distributed/resources/external_table_file/rawlog_withnull.csv'for 'LOAD DATA LOCAL INFILE' command.Due to underlying IOException: 

** BEGIN NESTED EXCEPTION ** 

java.io.FileNotFoundException
MESSAGE: /test/distributed/resources/external_table_file/rawlog_withnull.csv (No such file or directory)

STACKTRACE:

java.io.FileNotFoundException: /test/distributed/resources/external_table_file/rawlog_withnull.csv (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at com.mysql.cj.protocol.a.NativeProtocol.sendFileToServer(NativeProtocol.java:1865)
	at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:107)
	at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:48)
	at com.mysql.cj.protocol.a.NativeProtocol.read(NativeProtocol.java:1698)
	at com.mysql.cj.protocol.a.NativeProtocol.readAllResults(NativeProtocol.java:1752)
	at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1041)
	at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:921)
	at com.mysql.cj.NativeSession.execSQL(NativeSession.java:1154)
	at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:742)
	at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666)
	at io.mo.db.Executor.run(Executor.java:144)
	at io.mo.Tester.run(Tester.java:206)
	at io.mo.Tester.run(Tester.java:215)
	at io.mo.Tester.run(Tester.java:215)
	at io.mo.Tester.main(Tester.java:153)


** END NESTED EXCEPTION **

Expected Behavior

No response

Steps to Reproduce

https://github.com/matrixorigin/matrixone/actions/runs/9208910754/job/25332186175

Additional information

No response

@xzxiong xzxiong added kind/bug Something isn't working severity/s1 High impact: Logical errors or data errors that must occur kind/test-ci labels May 24, 2024
@xzxiong xzxiong added this to the 1.2.1 milestone May 24, 2024
@xzxiong xzxiong assigned xzxiong and unassigned guguducken May 24, 2024
@xzxiong
Copy link
Contributor Author

xzxiong commented May 24, 2024

贾节杰 5-24 11:56
是这样子的,这个是把相应的目录挂载到容器的这个目录下

谢泽雄 5-24 11:57
那我懂了。

谢泽雄 5-24 11:58
这样的话,我还不能执行 load data LOCAL infile

谢泽雄 5-24 11:58
我去问问动哥。

贾节杰 5-24 11:58
挂载到容器的/test这个目录

贾节杰 5-24 11:58
好的,这个就得用服务端本地load了

谢泽雄 5-24 11:59
是的,为了执行 load data infile。

谢泽雄 5-24 12:00
但我现在想跑 load data LOCAL infile

@xzxiong
Copy link
Contributor Author

xzxiong commented May 24, 2024

root cause:

  1. multi cn 需要通过 docker-compose 启动多个 cn 进行测试
  2. 为了执行 load data infile, 需要将 test/distributed/resources 挂载到 容器里

所以,这里有两个 resources 目录

  1. in 容器, 目录 /test/distributed/resources
  2. out 容器,目录 $workspace...../test/distributed/resources

@xzxiong
Copy link
Contributor Author

xzxiong commented May 24, 2024

提议:
获取 mo-tester 可以支持一个 $resources_local 的变量,解决load data LOCAL infile 的需求。

  • 这个变量用于指定 与mo-tester 同机的目录
  • 当指定 -p $workspace/test/distributed/cases 时,resources_local 的值为 $workspace/test/distributed/resources

@xzxiong
Copy link
Contributor Author

xzxiong commented May 27, 2024

提议: 获取 mo-tester 可以支持一个 $resources_local 的变量,解决load data LOCAL infile 的需求。

  • 这个变量用于指定 与mo-tester 同机的目录
  • 当指定 -p $workspace/test/distributed/cases 时,resources_local 的值为 $workspace/test/distributed/resources

@aressu1985 已对齐,同意该方案。

@xzxiong
Copy link
Contributor Author

xzxiong commented May 28, 2024

wait mo-tester pr matrixorigin/mo-tester#165 merged

@aressu1985
Copy link
Contributor

已经解决了

@matrix-meow
Copy link
Contributor

Hello @xzxiong. The bug issue in the BVT test code has not been removed,issues automatically open.

@xzxiong
Copy link
Contributor Author

xzxiong commented May 31, 2024

done.

@xzxiong xzxiong closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/test-ci resolved/v1.2.1 severity/s1 High impact: Logical errors or data errors that must occur
Projects
None yet
Development

No branches or pull requests

4 participants