cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 624 forks source link

TPCC fails with codegen #1440

Closed pervazea closed 6 years ago

pervazea commented 6 years ago

Attempting to run oltpbench TPCC out ouf my branch, where I have a usable version of codegen index scan. I am able to run YCSB and TATP, but TPCC fails as shown below.

It is trying to read a decimal field from the results of a select. If I understand the stack trace correctly, this is after it switches to binary marshaling mode.

13:37:14,406 (ThreadBench.java:327) INFO  - PHASE START :: [Workload=TPCC] [Serial=false] [Time=20] [WarmupTime=0] [Rate=unlimited] [Arrival=REGULAR] [Ratios=[45.0, 43.0, 4.0, 4.0, 4.0]] [ActiveWorkers=1]
13:37:14,560 (Worker.java:503) ERROR - Fatal error when invoking NewOrder/01
java.lang.ArrayIndexOutOfBoundsException: 4
    at org.postgresql.util.ByteConverter.int8(ByteConverter.java:30)
    at org.postgresql.util.ByteConverter.float8(ByteConverter.java:86)
    at org.postgresql.jdbc.PgResultSet.readDoubleValue(PgResultSet.java:3000)
    at org.postgresql.jdbc.PgResultSet.getFloat(PgResultSet.java:2286)
    at org.postgresql.jdbc.PgResultSet.getFloat(PgResultSet.java:2503)
    at com.oltpbenchmark.benchmarks.tpcc.procedures.NewOrder.newOrderTransaction(NewOrder.java:281)
    at com.oltpbenchmark.benchmarks.tpcc.procedures.NewOrder.run(NewOrder.java:158)
    at com.oltpbenchmark.benchmarks.tpcc.TPCCWorker.executeWork(TPCCWorker.java:74)
    at com.oltpbenchmark.api.Worker.doWork(Worker.java:386)
    at com.oltpbenchmark.api.Worker.run(Worker.java:296)
    at java.lang.Thread.run(Thread.java:748)
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 4
    at com.oltpbenchmark.api.Worker.doWork(Worker.java:504)
    at com.oltpbenchmark.api.Worker.run(Worker.java:296)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
    at org.postgresql.util.ByteConverter.int8(ByteConverter.java:30)
    at org.postgresql.util.ByteConverter.float8(ByteConverter.java:86)
    at org.postgresql.jdbc.PgResultSet.readDoubleValue(PgResultSet.java:3000)
    at org.postgresql.jdbc.PgResultSet.getFloat(PgResultSet.java:2286)
    at org.postgresql.jdbc.PgResultSet.getFloat(PgResultSet.java:2503)
    at com.oltpbenchmark.benchmarks.tpcc.procedures.NewOrder.newOrderTransaction(NewOrder.java:281)
    at com.oltpbenchmark.benchmarks.tpcc.procedures.NewOrder.run(NewOrder.java:158)
    at com.oltpbenchmark.benchmarks.tpcc.TPCCWorker.executeWork(TPCCWorker.java:74)
    at com.oltpbenchmark.api.Worker.doWork(Worker.java:386)
    ... 2 more
pervazea commented 6 years ago

A couple more data points and information.

  1. I ran this against (codegen) sequential scan vs. index scan, and it fails. As expected, not specific to the underlying operation.

  2. Passes with codegen off.

pervazea commented 6 years ago

Error in marshaling as applied to the codegen path, in computing type size(s).

pervazea commented 6 years ago

Not present in master, fixed in local branch, work in progress.