Skip to content

[Bug]: bvt/result_count failed: 2 more rows result #16530

Closed

Description

@xzxiong

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main, 1.2-dev

Commit ID

3b0325c, 5085e59

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

https://github.com/matrixorigin/matrixone/actions/runs/9306467231/job/25616635121

2024-05-30 17:53:45 INFO Executor:37 - Start to execute the script file[/home/runner/_work/matrixone/matrixone/matrixone/test/distributed/cases/zz_statement_query_type/result_count.sql] now, and it will take a few moment,pleas wait......
2024-05-30 17:53:45 ERROR RSRow:83 - The value of [row:49,column:0] does not equal with each other,one is [commit],but the other is [create database db1]
2024-05-30 17:53:45 ERROR Executor:199 - [/home/runner/_work/matrixone/matrixone/matrixone/test/distributed/cases/zz_statement_query_type/result_count.sql][row:11][select statement, result_count from statement_info where account="bvt_result_count" and statement not like '%mo_ctl%' and length(statement) > 0 and status != 'Running' and aggr_count < 1 order by request_at desc limit 50;] was executed failed, con[id=0, user=dump, ***

企业微信截图_fb66ea9a-e80c-482d-9be0-0bac2fa715af

Expected Behavior

No response

Steps to Reproduce

run MatrixOne CI

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s0
    on May 31, 2024
  2. self-assigned this
    on May 31, 2024
  3. added this to the 1.2.1 milestone on May 31, 2024
  4. xzxiong commented on May 31, 2024

    @xzxiong
    ContributorAuthor

    root cause: case 设计问题,多出来的 2行都是 insert 语句,按聚合逻辑是有可能被聚合,也有可能不被聚合 —— 结果不稳定。

  5. xzxiong commented on May 31, 2024

    @xzxiong
    ContributorAuthor

    为了保证 不被聚合,有以下几种方式:

    1. 用 /*cloud_user*/ 保证一定不会被聚合。
    2. 用 bvt tag -- @session:id=.... 隔离到不同的 session 下。
  6. xzxiong commented on May 31, 2024

    @xzxiong
    ContributorAuthor

    采用 hint /*cloud_user*/ 解决问题

  7. xzxiong commented on May 31, 2024

    @xzxiong
    ContributorAuthor

    ref: #14836

  8. xzxiong commented on May 31, 2024

    @xzxiong
    ContributorAuthor

    https://github.com/matrixorigin/ci-test/actions/runs/9319469691/job/25654986820

    我仔细看了下,整个 result_count 的case 很难控制: statement_info 聚合逻辑 V.S. 预期的query history
    我准备通过一下方式解决:

    1. 需要先屏蔽该bvt
    2. 支持一个 session variable控制,当前session 是否进行聚合操作。

    在解决前,可能需要先重试该case

  9. modified the milestones: 1.2.1, 1.3.0 on Jun 3, 2024
  10. xzxiong commented on Jun 6, 2024

    @xzxiong
    ContributorAuthor

    下个迭代

  11. xzxiong commented on Jun 11, 2024

    @xzxiong
    ContributorAuthor

    Not plan yet

  12. xzxiong commented on Jun 14, 2024

    @xzxiong
    ContributorAuthor

    Not plan yet

  13. added
    severity/s1
    and removed
    severity/s0
    on Jun 17, 2024
  14. xzxiong commented on Jun 18, 2024

    @xzxiong
    ContributorAuthor

    Not plan yet

  15. xzxiong commented on Jul 10, 2024

    @xzxiong
    ContributorAuthor

    repro: https://github.com/matrixorigin/matrixone/actions/runs/9870656005/job/27257000560?pr=17454
    image

    [/home/runner/work/matrixone/matrixone/upstream/test/distributed/cases/zz_statement_query_type/statement_query_type_1.sql] SQL: select statement,query_type,sql_source_type from  system.statement_info where account="bvt_query_type_part1" and sql_source_type="external_sql" and status != "Running" and statement not like '%mo_ctl%' and aggr_count <1 order by request_at desc limit 96;
    
    • root cause: L111 与 L112 + L41 +42 按预期应该会聚合,但聚合策略本来就不稳定。
    • image
  16. xzxiong commented on Jul 10, 2024

    @xzxiong
    ContributorAuthor

    https://github.com/matrixorigin/ci-test/actions/runs/9319469691/job/25654986820

    我仔细看了下,整个 result_count 的case 很难控制: statement_info 聚合逻辑 V.S. 预期的query history
    我准备通过一下方式解决:

    1. 需要先屏蔽该bvt
    2. 支持一个 session variable控制,当前session 是否进行聚合操作。

    在解决前,可能需要先重试该case

    在 1.3.0 中,计划支持 mo_ctl 可以关闭当前 session 的 statement的聚合逻辑 ==> 保障 bvt 的验证,不用考虑聚合的行为来编辑case

    • 通过 mo_ctl,防止普通租户的使用。
  17. xzxiong commented on Aug 1, 2024

    @xzxiong
    ContributorAuthor

    总结

    1. session variable set session disable_agg_statement = on; (default off) 可关闭当前 session 的 statement 的aggr
    2. fix bvt case
      • result_count
      • statement_query_type_1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions