Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

TPCC benchmark violates consistency conditions #345

Open
rnbguy opened this issue Nov 8, 2020 · 0 comments
Open

TPCC benchmark violates consistency conditions #345

rnbguy opened this issue Nov 8, 2020 · 0 comments

Comments

@rnbguy
Copy link

rnbguy commented Nov 8, 2020

Shouldn't all the executeBatch() be called out of these if-blocks?

if (batchSize == TPCCConfig.configCommitCount) {
itemPrepStmt.executeBatch();
itemPrepStmt.clearBatch();
transCommit(conn);
batchSize = 0;
}

if ((k % TPCCConfig.configCommitCount) == 0) {
stckPrepStmt.executeBatch();
stckPrepStmt.clearBatch();
transCommit(conn);
}

if ((k % TPCCConfig.configCommitCount) == 0) {
custPrepStmt.executeBatch();
histPrepStmt.executeBatch();
custPrepStmt.clearBatch();
custPrepStmt.clearBatch();
transCommit(conn);
}

if ((k % TPCCConfig.configCommitCount) == 0) {
ordrPrepStmt.executeBatch();
if (newOrderBatch > 0) {
nworPrepStmt.executeBatch();
newOrderBatch = 0;
}
orlnPrepStmt.executeBatch();
ordrPrepStmt.clearBatch();
nworPrepStmt.clearBatch();
orlnPrepStmt.clearBatch();
transCommit(conn);
}

Because when this commit() is called in the end, the prepared statements in the last turns, are never taken account.

.. and D_NEXT_O_ID is getting hardcoded here.

district.d_next_o_id = TPCCConfig.configCustPerDist + 1;

.. which, in turn, violates TPCC consistency conditions 2 and 3 after loading phase and execution phase respectively.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant