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]: tpcc 5000 warehouse test ConsistencyCheck sql reported Invalid alloc size 1147486208 #17841

Closed
1 task done
heni02 opened this issue Aug 1, 2024 · 6 comments
Closed
1 task done
Assignees
Labels
area/spill kind/bug Something isn't working phase/testing severity/s1 High impact: Logical errors or data errors that must occur
Milestone

Comments

@heni02
Copy link
Contributor

heni02 commented Aug 1, 2024

@heni02 heni02 added kind/bug Something isn't working severity/s1 High impact: Logical errors or data errors that must occur labels Aug 1, 2024
@heni02 heni02 added this to the 1.3.0 milestone Aug 1, 2024
@heni02
Copy link
Contributor Author

heni02 commented Aug 1, 2024

related #17640

@heni02
Copy link
Contributor Author

heni02 commented Aug 1, 2024

tpcc 10000 warehouse 1000threads 以下sql执行超过2min+
SQL: (select o_w_id, o_d_id, sum(o_ol_cnt) from bmsql_oorder group by o_w_id, o_d_id) except (select ol_w_id, ol_d_id, count(ol_o_id) from bmsql_order_line group by ol_w_id, ol_d_id);
image

@sukki37 sukki37 modified the milestones: 2.0.0, 2.0.1 Oct 19, 2024
@aressu1985
Copy link
Contributor

经和明松沟通,目前正在处理,计划2.0.1解决

@m-schen
Copy link
Contributor

m-schen commented Nov 22, 2024

https://github.com/m-schen/matrixone/tree/split-agg-result

由该分支进行处理,预计今天应该可以提pr.

@sukki37 sukki37 modified the milestones: 2.0.1, 2.0.2 Nov 25, 2024
@fengttt fengttt assigned badboynt1 and unassigned m-schen Dec 15, 2024
fengttt added a commit that referenced this issue Dec 15, 2024
…roups. (#20697)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

https://github.com/matrixorigin/MO-Cloud/issues/4084
https://github.com/matrixorigin/MO-Cloud/issues/3831
#17841
Maybe Fix: #14675

## What this PR does / why we need it:
1. 
Group / MergeGroup算子支持分块保存/发送结果,避免单块内存过大的问题。
实现方案:
每个类型均有对应的行数上限,确保一个block的内存不超过1Gb。

以 `select col1, agg(col2) group by col1;`为例,
col1对应的分块行数为m1, agg(col2)对应的分块行数为m2, 
取min(m1, m2)作为单个block的行数上限,agg result和group by均采用这个数值。
需要注意的是:bytes类型的行数上限目前取的是 32768,
这个数字是根据varchar的单行上限不超过16kb来的。对于其他类型,例如blob和text,依旧可能发生单块内存过大的问题。

2.
简化Agg的代码。

3.
由于window算子不支持分批发送的逻辑,添加对应报错信息避免结果出错。
这部分逻辑需要后续由窗口开发人员进行完善。

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: fengttt <[email protected]>
@aressu1985 aressu1985 assigned heni02 and unassigned badboynt1 Dec 18, 2024
@aressu1985 aressu1985 modified the milestones: 2.0.2, 2.1.0 Dec 18, 2024
@heni02
Copy link
Contributor Author

heni02 commented Dec 24, 2024

回归测试持续观察中

@heni02
Copy link
Contributor Author

heni02 commented Jan 9, 2025

持续观察2周,没有再出现该问题,closed

@heni02 heni02 closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spill kind/bug Something isn't working phase/testing severity/s1 High impact: Logical errors or data errors that must occur
Projects
None yet
Development

No branches or pull requests

5 participants