Percona-Lab / sysbench-tpcc

Sysbench scripts to generate a tpcc-like workload for MySQL and PostgreSQL
Apache License 2.0
292 stars 104 forks source link

Payment choose warehouse incorrectly #38

Open VOID001 opened 3 years ago

VOID001 commented 3 years ago

According to the TPCC spec, for payment transaction, the warehouse choosing rule is as follows: image

So for any worker, the home warehouse should be fixed across a full run.

However in the code https://github.com/Percona-Lab/sysbench-tpcc/blob/master/tpcc_run.lua#L226, the home warehouse is selected randomly for each time we start a payment transaction.

I guess this might be a different implementation to TPC-C spec