matrixorigin / matrixone

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

[Bug]: tpcc order status txn sometimes error during tpcc long running test in stability test on distributed mode #16607

Open aressu1985 opened 6 months ago

aressu1985 commented 6 months ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

b4bf084

Other Environment Information

- Hardware parameters:
3*CN: 16C 64G
1*DN: 16C 64G
3*LOG: 4C 16G
2*PROXY: 3C 6G
- OS type:
- Others:

Actual Behavior

during tpcc long running test in stability test on distributed mode, order status txn sometimes failed by java.lang.NumberFormatException:

2024-06-04 08:02:11 INFO jTPCCTerminal:376 - Terminal 'Term-08' has re-connected to server, this terminal will continue.... java.lang.NumberFormatException at java.math.BigDecimal.(BigDecimal.java:497) at java.math.BigDecimal.(BigDecimal.java:383) at java.math.BigDecimal.(BigDecimal.java:809) at com.mysql.cj.protocol.a.MysqlBinaryValueDecoder.decodeDecimal(MysqlBinaryValueDecoder.java:221) at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:131) at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:250) at com.mysql.cj.protocol.a.result.ByteArrayRow.getValue(ByteArrayRow.java:91) at com.mysql.cj.jdbc.result.ResultSetImpl.getNonStringValueFromRow(ResultSetImpl.java:656) at com.mysql.cj.jdbc.result.ResultSetImpl.getDouble(ResultSetImpl.java:872) at com.mysql.cj.jdbc.result.ResultSetImpl.getDouble(ResultSetImpl.java:877) at io.mo.jTPCCTData.executeOrderStatus(jTPCCTData.java:1321) at io.mo.jTPCCTData.execute(jTPCCTData.java:125) at io.mo.jTPCCTerminal.executeTransactions(jTPCCTerminal.java:254) at io.mo.jTPCCTerminal.run(jTPCCTerminal.java:135) at java.lang.Thread.run(Thread.java:748) 2024-06-04 08:02:11 FATAL jTPCCTerminal:261 -

statements in order status txn are as following:

a. //60%的概率会执行 SELECT c_id " + " FROM bmsql_customer " + " WHERE c_w_id = ? AND c_d_id = ? AND c_last = ? " + " ORDER BY c_first")

b.
SELECT c_first, c_middle, c_last, c_balance " + " FROM bmsql_customer " + " WHERE c_w_id = ? AND c_d_id = ? AND c_id = ?")

c. //查询该用户的最后一个订单 SELECT o_id, o_entry_d, o_carrier_id " + " FROM bmsql_oorder " + " WHERE o_w_id = ? AND o_d_id = ? AND o_c_id = ? " + " AND o_id = (" + " SELECT max(o_id) " + " FROM bmsql_oorder " + " WHERE o_w_id = ? AND o_d_id = ? AND o_c_id = ?" + " )") SELECT o_id, o_entry_d, o_carrier_id FROM bmsql_oorder where o_w_id = 1 and o_d_id =1 and o_c_id =1 and o_id = (SELECT max(o_id) from bmsql_oorder where o_w_id = 1 and o_d_id = 1 and o_c_id =1);

d. SELECT ol_i_id, ol_supply_w_id, ol_quantity, " + " ol_amount, ol_delivery_d " + " FROM bmsql_order_line " + " WHERE ol_w_id = ? AND ol_d_id = ? AND ol_o_id = ? " + " ORDER BY ol_w_id, ol_d_id, ol_o_id, ol_number");

And the error happened in step b, when the jdbc get the value of column[c_balance] which is decimal type from result, the java.lang.NumberFormatException was thrown out.

image

the table ddl of tpcc: tableCreates.txt

mo-tpcc tool log: tpcc.log

mo log link: https://shanghai.idc.matrixorigin.cn:30001/explore?panes=%7B%222U_%22:%7B%22datasource%22:%22loki%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22mo-nightly-b4bf084-20240603183454%5C%22%7D%20%7C%3D%20%60%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22loki%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%221717425053000%22,%22to%22:%221717464653000%22%7D%7D%7D&schemaVersion=1&orgId=1

Expected Behavior

No response

Steps to Reproduce

1. run a mo cluster with config in this issue
2. run tpch 10G loop test processes in one independant tenant
3. run tpcc 10 warehouse and 10 ternimals longrunnig test processes in one independant tenant, prepare mode
4. run sysbench mixed cases(insert/delete/update/select) longrunnig test processes with 75 terminals in one independant tenant,non-prepare mode
5. run another sysbench mixed cases(insert/delete/update/select) longrunnig test processe with  75 terminals in one independant tenant,non-prepare mode

Additional information

No response

YANGGMM commented 6 months ago

@daviszhen 麻烦看一下

daviszhen commented 5 months ago

未投入

daviszhen commented 5 months ago

未投入

daviszhen commented 5 months ago

未投入

daviszhen commented 5 months ago

无投入

daviszhen commented 5 months ago

无投入

daviszhen commented 5 months ago

无投入

daviszhen commented 5 months ago

未投入

daviszhen commented 4 months ago

未投入

daviszhen commented 4 months ago

未投入

daviszhen commented 4 months ago

未投入

daviszhen commented 4 months ago

没投入

daviszhen commented 4 months ago

没投入

daviszhen commented 4 months ago

没投入

daviszhen commented 4 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 3 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 2 months ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

issue 上的日志链接 搜不到任何日志。

daviszhen commented 1 month ago

先prepare 语句,然后execute. 结果中的某个decimal 数值 在client 端的jdbc 解码时出错。

从java decimal的报错代码行数看,exponent溢出的可能行比较大。

jdk 1.8 java/math/BigDecimal.java

image

code

BigDecimal.java.txt

daviszhen commented 1 month ago

现在的问题是 exponent 溢出的 数值大概是什么样?

daviszhen commented 1 month ago

定位中

daviszhen commented 1 month ago

定位中

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 3 weeks ago

未投入

daviszhen commented 3 weeks ago

未投入

daviszhen commented 2 weeks ago

未投入

daviszhen commented 2 weeks ago

未投入

daviszhen commented 1 week ago

未投入

daviszhen commented 6 days ago

未投入

daviszhen commented 1 day ago

未投入