matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 276 forks source link

[Bug]: Aggregate logging :statement in statement_info have empty string value #10551

Closed heni02 closed 11 months ago

heni02 commented 1 year ago

Is there an existing issue for the same bug?

Environment

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

Actual Behavior

aggr_count>0 have empty string value, but aggr_count=0 not

企业微信截图_bb0ca926-96a4-49d5-9fcc-5490dafbbd28 企业微信截图_9de29411-8a64-4929-a7c8-aa110034b5ff

image

Expected Behavior

No response

Steps to Reproduce

Concurrent 100 inserts, run for 10 minutes, and select statement,
Concurrent 100 inserts use mo-load tool:
1.git clone https://github.com/matrixorigin/mo-load.git
2.config case insert run.yaml, path:cases/ddl/run.yaml
vuser: 100 
- sql: "insert into r1 values ({tbx});"
3.login mysql ,create database db; use db; create table r1(c1 int);
4. ./start.sh -c cases/ddl/

Additional information

No response

m-schen commented 1 year ago

@xzxiong @gavinyue 我不是很清楚这个bug的描述,包括aggr_count的含义,是statement的字符统计吗。出现的情况是statement_info表的statement列的值为空? 麻烦确认一下该情况是否符合预期以及bug的归属。

heni02 commented 1 year ago

@m-schen 这个bug主要是statement_info表里有statement为空值这个情况,如果是为空是预期的,是什么情况,如果不是预期,这是个bug,需要修复

xzxiong commented 1 year ago

@m-schen 这个bug主要是statement_info表里有statement为空值这个情况,如果是为空是预期的,是什么情况,如果不是预期,这是个bug,需要修复

@gavinyue ptal, 当 aggr_count > 0 时,statement这个字段应该是什么值。

gavinyue commented 1 year ago

理论上是第一个statementinfo的statement。 我看一下吧

gavinyue commented 1 year ago

Work on the fix now. Bascially it is caused by stringbuilder in the aggr.

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Find the problem. Ready to fix.

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

这个应该解决了,准备验证一下,然后给test

gavinyue commented 1 year ago

正在解决这个问题

gavinyue commented 1 year ago

Keep looking into it tomorrow.

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

pending

gavinyue commented 1 year ago

pending

gavinyue commented 1 year ago

Looking

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

正在和其他写入异常的issue 一起研究

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

pending

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Working

gavinyue commented 12 months ago

Pending

gavinyue commented 11 months ago

image

现在的情况是, 聚合的情况下, statement是保留第一个。 之前的问题还是racing的情况下导致的

但是cloud里 确实有statement为空的情况, 但是对应的都是plan里step为空。

这种情况下, 在report_statement.go 加了一个if check 和log https://github.com/matrixorigin/matrixone/pull/12619

gavinyue commented 11 months ago

track together in https://github.com/matrixorigin/matrixone/issues/12432

heni02 commented 11 months ago

明天测试验证

heni02 commented 11 months ago

confirm,closed commit id:3140d2e3eda1d4318645f07dcdbd21296ac1e956 默认聚合功能打开,普通租户下并发500 insert持续跑3个小时,插入2亿多条sql,statement_info共4千6百多万行,没有出现statement为空的情况

企业微信截图_40e503a2-4b4b-424c-af49-46132d4367ac