Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39991

benchbase TPCC runs onto unexpected response when innodb_snapshot_isolaton is ON

    XMLWordPrintable

Details

    Description

      diego dupin has a writeup on running benchbase here https://mariadb.com/resources/blog/how-to-benchmark-mariadb-mysql-using-java-connector/

      Unexpected exception is logged by the benchmark, and transaction is not retried.
      This does not occur when innodb_snapshot_isolation is OFF.
      My suggestion not to introduce new error codes, and reuse existing "Deadlock found, try restarting transaction" instead. Even if inaccurate from a pedantic point of view, everyone is prepared to handle that, while "Record has changed since last read in table 'stock'; try restarting transaction"is something nobody is prepared to handle.

      This is especially important since innodb_snapshot_isolation=ON was pushed for most of the already released versions, after the GA, and a new error thrown changes the behavior for already running applications.

      [WARN ] 2026-06-10 17:56:32,645 [TPCCWorker<002>]  com.oltpbenchmark.api.Worker doWork - SQLException occurred during [com.oltpbenchmark.benchmarks.tpcc.procedures.Payment/02] and will not be retried... sql state [HY000], error code [1020].
      java.sql.SQLException: (conn=73) Record has changed since last read in table 'customer'; try restarting transaction
              at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:306)
              at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:378)
              at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:189)
              at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:1246)
              at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:1185)
              at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:1104)
              at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:1028)
              at org.mariadb.jdbc.ServerPreparedStatement.executeStandard(ServerPreparedStatement.java:151)
              at org.mariadb.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:98)
              at org.mariadb.jdbc.ServerPreparedStatement.executeLargeUpdate(ServerPreparedStatement.java:449)
              at org.mariadb.jdbc.ServerPreparedStatement.executeUpdate(ServerPreparedStatement.java:426)
              at com.oltpbenchmark.benchmarks.tpcc.procedures.Payment.updateBalance(Payment.java:507)
              at com.oltpbenchmark.benchmarks.tpcc.procedures.Payment.run(Payment.java:191)
              at com.oltpbenchmark.benchmarks.tpcc.TPCCWorker.executeWork(TPCCWorker.java:67)
              at com.oltpbenchmark.api.Worker.doWork(Worker.java:444)
              at com.oltpbenchmark.api.Worker.run(Worker.java:292)
              at java.base/java.lang.Thread.run(Thread.java:1575)
      [WARN ] 2026-06-10 17:56:33,219 [TPCCWorker<001>]  org.mariadb.jdbc.message.server.ErrorPacket warn - Error: 1020-HY000: Record has changed since last read in table 'stock'; try restarting transaction
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wlad Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.