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

TPCC benchmark violates consistency conditions #345

Description

@rnbguy

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions