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]: the order of sql record in statement_info table is not deterministic for the same sql execution order #10279

Closed
1 task done
aressu1985 opened this issue Jun 28, 2023 · 3 comments
Assignees
Labels
kind/bug Something isn't working needs-triage severity/s1 High impact: Logical errors or data errors that must occur
Milestone

Comments

@aressu1985
Copy link
Contributor

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): fbbbb88
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

for some cases, the same query from the statement_info can get different result for the same sql execution. e.g.
2023-06-28 01:43:56 ERROR RSRow:65 - The value of [row:2,column:0] does not equal with each other,one is [insert into __mo_t1 values(1)],but the other is [select * from __mo_t1]
2023-06-28 01:43:56 ERROR Executor:159 - [/runner/_work/matrixone/matrixone/matrixone/test/distributed/cases/sql_source_type/sql_source_type.sql][row:18][select statement, sql_source_type from system.statement_info where account="bvt_sql_source_type" and status != 'Running' and statement not like '%mo_ctl%' order by request_at desc limit 3;] was executed failed, con[id=0, user=dump, ***
2023-06-28 01:43:56 ERROR Executor:161 - [EXPECT RESULT]:
statement sql_source_type
show tables cloud_user_sql
use system cloud_nonuser_sql
insert into __mo_t1 values(1) external_sql
2023-06-28 01:43:56 ERROR Executor:162 - [ACTUAL RESULT]:
statement sql_source_type
show tables cloud_user_sql
use system cloud_nonuser_sql
select * from __mo_t1 external_sql
2023-06-28 01:43:56 INFO Executor:241 - The script file[/runner/_work/matrixone/matrixone/matrixone/test/distributed/cases/sql_source_type/sql_source_type.sql] has been executed, and cost: 16.442s, total:12, success:11,

and the sql execution order is :

create database if not exists ssb;
use ssb;
/* cloud_user /drop table if exists __mo_t1;
/
cloud_nonuser / create table __mo_t1(a int);
insert into __mo_t1 values(1);
select * from __mo_t1;
/
cloud_nonuser / use system;/ cloud_user */show tables;

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

@aressu1985 aressu1985 added kind/bug Something isn't working needs-triage severity/s1 High impact: Logical errors or data errors that must occur labels Jun 28, 2023
@aressu1985 aressu1985 added this to the V0.8.0 milestone Jun 28, 2023
@gavinyue
Copy link
Contributor

Found out the problem. Will have the fix together with the pr to fix the duplicate statement_id

@gavinyue
Copy link
Contributor

gavinyue commented Jul 1, 2023

Should be fixed after #10302

@florashi181 florashi181 modified the milestones: V0.8.0, 1.0.0 Jul 2, 2023
@aressu1985
Copy link
Contributor Author

tracking

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 needs-triage severity/s1 High impact: Logical errors or data errors that must occur
Projects
None yet
Development

No branches or pull requests

4 participants