Permalink
Browse files

Added workaround for Peloton when it gets a SQLException. We will eve…

…ntually need to remove this
  • Loading branch information...
apavlo committed Dec 29, 2016
1 parent 3aca9d2 commit b518d6cf50958c1db9afd75c88292554ec67ccf3
Showing with 13 additions and 2 deletions.
  1. +12 −1 src/com/oltpbenchmark/api/Worker.java
  2. +1 −1 tests/com/oltpbenchmark/api/AbstractTestCase.java
@@ -517,7 +517,18 @@ protected final TransactionType doWork(boolean measure, SubmittedProcedure piece
} catch (SQLException ex) {
String msg = String.format("Unexpected fatal, error in '%s' when executing '%s' [%s]",
this, next, dbType);
throw new RuntimeException(msg, ex);
// FIXME: PAVLO 2016-12-29
// Right now our DBMS throws an exception when the txn gets aborted
// due to a conflict, so for now we have to not kill ourselves.
// This *does not* incorrectly inflate our performance numbers.
// It's more of a workaround for now until I can figure out how to do
// this correctly in JDBC.
if (dbType == DatabaseType.PELOTON) {
msg += "But we are not stopping because " + dbType + " cannot handle this correctly";
LOG.warn(msg);
} else {
throw new RuntimeException(msg, ex);
}
}
return (next);
@@ -111,7 +111,7 @@ protected void setUp(Class<T> clazz, Class...procClasses) throws Exception {
new Object[] { this.workConf },
new Class<?>[] { WorkloadConfiguration.class });
assertNotNull(this.benchmark);
System.err.println(this.benchmark + " -> " + this.dbName);
LOG.info(DB_TYPE + "::" + this.benchmark + " -> " + this.dbName);
this.catalog = this.benchmark.getCatalog();
assertNotNull(this.catalog);

0 comments on commit b518d6c

Please sign in to comment.