cmu-db / peloton

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

oltpbench: twitter fails #1046

Open pervazea opened 6 years ago

pervazea commented 6 years ago

When trying to run oltpbench twitter, it cannot create the database.

benchmark output:


Benchmark:     TWITTER {com.oltpbenchmark.benchmarks.twitter.TwitterBenchmark}
Configuration: /home/pakhtar/proj/saved_configs/twitter_config.xml
Type:          PELOTON
Driver:        org.postgresql.Driver
URL:           jdbc:postgresql://localhost:15721/twitter
Isolation:     TRANSACTION_SERIALIZABLE
Scale Factor:  1.0

13:14:31,175 (DBWorkload.java:260) INFO  - ======================================================================
13:14:31,196 (DBWorkload.java:512) INFO  - Creating new TWITTER database...
Error executing: CREATE TABLE tweets (   id bigint NOT NULL,   uid int NOT NULL REFERENCES user_profiles (uid),   text char(140) NOT NULL,   createdate datetime DEFAULT NULL,   PRIMARY KEY (id) ) 
Exception in thread "main" java.lang.RuntimeException: Unexpected error when trying to create the twitter database
        at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:268)
        at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:248)
        at com.oltpbenchmark.DBWorkload.runCreator(DBWorkload.java:794)
        at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:513)
Caused by: org.postgresql.util.PSQLException: DataType datetime not supported yet...

        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2310)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2023)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:217)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:421)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:318)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:310)
        at com.oltpbenchmark.util.ScriptRunner.runScript(ScriptRunner.java:163)
        at com.oltpbenchmark.util.ScriptRunner.runScript(ScriptRunner.java:102)
        at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:266)
        ... 3 more

Nothing useful from Peloton:

2018-01-10 13:14:31 [/home/proj/peloton-pa/peloton/src/network/network_manager.cpp:49:CreateNewConnection] INFO  - Create new connection: id = 56
2018-01-10 13:14:31 [/home/proj/peloton-pa/peloton/src/network/network_connection.cpp:425:ProcessInitialPacket] INFO  - protocol version: 196608
2018-01-10 13:14:31 [/home/proj/peloton-pa/peloton/src/network/network_connection.cpp:589:CloseSocket] DEBUG - Attempt to close the connection 56
2018-01-10 13:14:31 [/home/proj/peloton-pa/peloton/src/network/network_connection.cpp:605:CloseSocket] DEBUG - Already Closed the connection 56

Configuration file attached, as created by benchmark.py twitter_config.xml.txt

Ran manually. Configuration:

pervazea commented 6 years ago

Running oltpbench epinions fails in a very similar manner. Adding output here, on the assumption it may be the same cause. If it is not, we can create a separate issue.

13:22:50,869 (DBWorkload.java:260) INFO  - ======================================================================
13:22:50,883 (DBWorkload.java:512) INFO  - Creating new EPINIONS database...
Error executing: CREATE TABLE review_rating (   u_id int NOT NULL REFERENCES useracct (u_id),   a_id int NOT NULL,   rating int NOT NULL,   status int NOT NULL,   creation_date datetime DEFAULT NULL,   last_mod_date datetime DEFAULT NULL,   type int DEFAULT NULL,   vertical_id int DEFAULT NULL ) 
Exception in thread "main" java.lang.RuntimeException: Unexpected error when trying to create the epinions database
apavlo commented 6 years ago

DATETIME is a MySQL-specifc type. Try renaming the postgres DDL file to make it a peloton one:

cp src/com/oltpbenchmark/benchmarks/epinions/ddls/epinions-postgres-ddl.sql src/com/oltpbenchmark/benchmarks/epinions/ddls/epinions-peloton-ddl.sql
pervazea commented 6 years ago

For twitter, after switching to the postgres ddl file, we fail creating the databse, because we don't support datatype "serial". One alternative would be bigint with auto_increment. Do we support auto_increment?

Error information below: Error executing: CREATE TABLE "added_tweets" ( id serial, uid int NOT NULL REFERENCES "user_profiles" (uid), text char(140) NOT NULL, createdate timestamp DEFAULT NULL, PRIMARY KEY (id) )

apavlo commented 6 years ago

We don't support SERIAL (aka SEQUENCES). We will add this next semester.

Let's skip this benchmark for now.