Giter VIP home page Giter VIP logo

tidb-bench's Introduction

tidb-bench's People

Contributors

andelf avatar busyjay avatar c4pt0r avatar coocood avatar cwen0 avatar gregwebs avatar hanfei1991 avatar ilovesoup avatar jackysp avatar liubo0127 avatar lonng avatar morefreeze avatar ngaut avatar shenli avatar tiancaiamao avatar wsabc01 avatar zhangjinpeng87 avatar zhengwanbo avatar zhexuany avatar zz-jason avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tidb-bench's Issues

[tpcc] "Data Truncated" error from delivery.c

I got MySQL error code 1265, "Data Truncated" error when running tpcc.

Direct cause is the precision of ol_total in delivery.c.

I tried tpcc-mysql and got the same problem. I modified that line in delivery.c to bypass this problem.

Environment:
mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper
mysql_config 5.7.19
tikv commit hash: e2d2867140cd84c3fa9dcbb10b72b33e1d586f5e
tidb commit hash: 488365285a0a6a843b3d53c8bf6a196609214fc1
pd commit hash: e28329cf7eb86f47161f682b506837a1b4e71da5
OS: CentOS Linux release 7.3.1611 (Core)

table table is not correct

Output when generate
generate customers table done - with s
But table name in db is customer (missing 's')

sysbench shell 也许应该保留

lua脚本不需要维护了,但是咱们的shell我觉得还不错,能够经过简单配置马上跑一个标准benchmark,废掉可惜了,很好的一个入门工具

tidb fails tpcc with error with code "00000"

I populate the db with command

./tpcc_load -h $TIDB_HOST -P 4000 -d tpcc1000 -u root -p "" -w 1

and then run the benchmark

./tpcc_start -h $TIDB_HOST -P 4000 -d tpcc1000 -u root -w 1 -c 1 -r 10 -l 20

I see a lot of error messages of form

neword 0:1
0, 00000,
neword 0:1
0, 00000,
neword 0:1
0, 00000,
neword 0:1
0, 00000,

Here is the tidb.log

2017/08/08 14:06:37 txn.go:174: [info] [kv] Rollback txn 393793030737100810
2017/08/08 14:06:37 adapter.go:214: [debug] [6][TIME_QUERY] 154.427µs rollback
2017/08/08 14:06:37 adapter.go:214: [debug] [6][TIME_QUERY] 1.44388ms UPDATE warehouse SET w_ytd = w_ytd + ? WHERE w_id = ?
2017/08/08 14:06:37 adapter.go:214: [debug] [6][TIME_QUERY] 1.171086ms SELECT w_street_1, w_street_2, w_city, w_state, w_zip, w_name FROM warehouse WHERE w_id = ?
2017/08/08 14:06:37 adapter.go:122: [debug] [6][ActivePendingTxn] rollback
2017/08/08 14:06:37 simple.go:126: [info] [6] execute rollback statement
2017/08/08 14:06:37 txn.go:174: [info] [kv] Rollback txn 393793030750208001
2017/08/08 14:06:37 adapter.go:214: [debug] [6][TIME_QUERY] 84.705µs rollback
2017/08/08 14:06:37 adapter.go:214: [debug] [6][TIME_QUERY] 1.567242ms UPDATE warehouse SET w_ytd = w_ytd + ? WHERE w_id = ?
2017/08/08 14:06:37 adapter.go:214: [debug] [6][TIME_QUERY] 1.124038ms SELECT w_street_1, w_street_2, w_city, w_state, w_zip, w_name FROM warehouse WHERE w_id = ?
2017/08/08 14:06:37 adapter.go:122: [debug] [6][ActivePendingTxn] rollback
2017/08/08 14:06:37 simple.go:126: [info] [6] execute rollback statement
2017/08/08 14:06:37 txn.go:174: [info] [kv] Rollback txn 393793030750208002

pd.log

2017/08/08 14:06:33.928 tso.go:140: [debug] save timestamp ok: prev 2017-08-08 14:06:33.875986661 +0000 UTC last 2017-08-08 14:06:33.880365516 +0000 UTC save 2017-08-08 14:06:36.925492912 +0000 UTC
2017/08/08 14:06:36.927 tso.go:140: [debug] save timestamp ok: prev 2017-08-08 14:06:36.87540065 +0000 UTC last 2017-08-08 14:06:36.925492912 +0000 UTC save 2017-08-08 14:06:39.926001972 +0000 UTC
2017/08/08 14:06:39.928 tso.go:140: [debug] save timestamp ok: prev 2017-08-08 14:06:39.875138276 +0000 UTC last 2017-08-08 14:06:39.926001972 +0000 UTC save 2017-08-08 14:06:42.927016765 +0000 UTC
2017/08/08 14:06:41.924 region_cache.go:134: [debug] GC 0 items

tikv.log

2017/08/08 14:06:37.142 mod.rs:292: [DEBUG] loop time - Instant { tv_sec: 184008, tv_nsec: 312039423 }
2017/08/08 14:06:37.142 mod.rs:315: [DEBUG] loop process - 0 events, Duration { secs: 0, nanos: 70021 }
2017/08/08 14:06:37.193 mod.rs:106: [DEBUG] scheduling task request [context region_id: 1001 region_epoch {conf_ver: 1 version: 2} peer {id: 1002 store_id: 1}, tp: 102, ranges: 9 (Some(start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001autocomm\377it\000\000\000\000\000\000\371" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001autocomm\377it\000\000\000\000\000\000\372"))]
2017/08/08 14:06:37.193 mod.rs:106: [DEBUG] scheduling task snapres [1304]
017/08/08 14:06:37.142 mod.rs:315: [DEBUG] loop process - 0 events, Duration { secs: 0, nanos: 70021 }
2017/08/08 14:06:37.193 mod.rs:106: [DEBUG] scheduling task request [context region_id: 1001 region_epoch {conf_ver: 1 version: 2} peer {id: 1002 store_id: 1}, tp: 102, ranges: 9 (Some(start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001autocomm\377it\000\000\000\000\000\000\371" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001autocomm\377it\000\000\000\000\000\000\372"))]
2017/08/08 14:06:37.193 mod.rs:106: [DEBUG] scheduling task snapres [1304]
2017/08/08 14:06:37.193 endpoint.rs:403: [DEBUG] scanning range: [start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001autocomm\377it\000\000\000\000\000\000\371" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001autocomm\377it\000\000\000\000\000\000\372", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001max_allo\377wed_pack\377et\000\000\000\000\000\000\371" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001max_allo\377wed_pack\377et\000\000\000\000\000\000\372", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001sql_mode\377\000\000\000\000\000\000\000\000\367" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001sql_mode\377\000\000\000\000\000\000\000\000\370", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_dis\377tsql_sca\377n_concur\377rency\000\000\000\374" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_dis\377tsql_sca\377n_concur\377rency\000\000\000\375", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ind\377ex_looku\377p_concur\377rency\000\000\000\374" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ind\377ex_looku\377p_concur\377rency\000\000\000\375", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ind\377ex_looku\377p_size\000\000\375" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ind\377ex_looku\377p_size\000\000\376", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ind\377ex_seria\377l_scan_c\377oncurren\377cy\000\000\000\000\000\000\371" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ind\377ex_seria\377l_scan_c\377oncurren\377cy\000\000\000\000\000\000\372", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_max\377_row_cou\377nt_for_i\377nlj\000\000\000\000\000\372" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_max\377_row_cou\377nt_for_i\377nlj\000\000\000\000\000\373", start: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ski\377p_utf8_c\377heck\000\000\000\000\373" end: "t\200\000\000\000\000\000\000\r_i\200\000\000\000\000\000\000\001\001tidb_ski\377p_utf8_c\377heck\000\000\000\000\374"]
2017/08/08 14:06:37.194 mod.rs:106: [DEBUG] scheduling task request [context region_id: 1001 region_epoch {conf_ver: 1 version: 2} peer {id: 1002 store_id: 1}, tp: 101, ranges: 8 (Some(start: "t\200\000\000\000\000\000\000\r_r\200\000\000\000\000\000\000\031" end: "t\200\000\000\000\000\000\000\r_r\200\000\000\000\000\000\000\033"))]
2017/08/08 14:06:37.194 mod.rs:106: [DEBUG] scheduling task snapres [1305]

OS: CentOS Linux release 7.3.1611 (Core)
TiDB Git Commit Hash: a5b26bb665b028281b8daeb28fbd3b7f0c8107bf
mysql: mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper

[tpcc] MySQL C API `mysql_autocommit` won't work unless calling this function twice consecutively.

I got the following error when I was running tpcc ./tpcc_start -hxxx.xxx.xxx.xxx -P 4000 -d tpcc1000 -u root -p '' -w 1 -c 1 -r 5 -l 120

error at thread_main
1105, HY000, transaction future is not set

TiDB's server side warning logs showed that the transaction hadn't been opened yet:

2018/02/05 00:32:20.138 conn.go:472: [warning] [1] dispatch error:
id:1, addr:172.20.50.91:43454 status:0, collation:latin1_swedish_ci, user:root
"SELECT o_id, o_entry_d, COALESCE(o_carrier_id,0) FROM orders WHERE o_w_id = ? AND o_d_id = ? AND o_c_id = ? AND o_id = (SELECT MAX(o_id) FROM orders WHERE o_w_id = ? AND o_d_id = ? AND o_c_id = ?)"
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session.go:1501: transaction future is not set
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/executor.go:583: 
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/plan/expression_rewriter.go:670: 
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/plan/expression_rewriter.go:95: 
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/plan/optimizer.go:101: 
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/prepared.go:165: 
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session.go:847: 
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/server/conn_stmt.go:51: 

I tried to modify the code main.c, calling mysql_autocommit twice:

  if(resp) {
    mysql_autocommit(ctx[t_num], 0);
    mysql_autocommit(ctx[t_num], 0);
  } else {
    mysql_close(ctx[t_num]);
    goto sqlerr;
  }

The error disappeared. I'm not sure it's a problem with TiDB ,or mysql_autocommit was not used correctly.

TiDB version:

mysql> select tidb_version();
+----------------------------------------------------------------------
| tidb_version()                                                                                                                                               |
+----------------------------------------------------------------------
| Release Version: v1.1.0-alpha.1-53-g1f1e5f5
Git Commit Hash: 1f1e5f53eb66acb9ef534d87f4e8daeae2552f73
Git Branch: master
UTC Build Time: 2018-02-01 03:33:14 |
+----------------------------------------------------------------------
1 row in set (0.04 sec)

LOAD DATA LOCAL INFILE - File not found

I'm having a problem with tidb
When I try to exec load_data.sh error like below appeared

load data error:

ERROR 2 (HY000) at line 1: File '*****/tools/web_sales.dat' not found (Errcode: 2)
ERROR 2 (HY000) at line 1: File '*****/tools/web_site.dat' not found (Errcode: 2)

tidb version : 2.0.4
os : centos 7.2

[tpcc]can not retry select for update statement when running with more than 1 client.

I populated data with 5 warehouses

./tpcc_load -h  172.31.2.242 -P 4000 -d tpcc1000 -u root -p "" -w 5

and then run the test

./tpcc_start -h  $TIDB_HOST -P 4000 -d tpcc1000 -u root -w 5 -c 2 -r 10 -l 40

However, from time to time in tidb.log I see

2017/08/10 03:29:30 txn.go:174: [info] [kv] Rollback txn 393820758446964737
2017/08/10 03:29:32 session.go:288: [warning] [3] retryable error: [try again later]: tikv restarts txn: Txn(Mvcc(WriteConflict { start_ts: 393820758984359937, conflict_ts: 393820758984359940, key: [116, 128, 0, 0, 0, 0, 0, 0, 255, 35, 95, 114, 128, 0, 0, 0, 0, 255, 0, 0, 17, 0, 0, 0, 0, 0, 250], primary: [116, 128, 0, 0, 0, 0, 0, 0, 35, 95, 114, 128, 0, 0, 0, 0, 0, 0, 17] })), txn: <nil>
2017/08/10 03:29:32 session.go:298: [warning] [3] finished txn:<nil>, [3] can not retry select for update statement
2017/08/10 03:29:32 session.go:644: [warning] [3] session error:
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session.go:372: [3] can not retry select for update statement
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session.go:299:
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/tidb.go:172:
{
  "currDBName": "tpcc1000",
  "id": 3,
  "preparedStmtCount": 35,
  "status": 0,
  "strictMode": true,
  "user": "root@172.**.***.***"
}

Note that such error does not appear if i run tpcc_start with -c 1, and I didn't any warn or error in tikv.log or pd.log

tidb Git Commit Hash: 18f84dd3c673616c1edd546002ecbfb3dd324a20
tikv Git Commit Hash: 0aef87fb2cac52038f496c09dec3c8f52fdaef2d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.