Announcement

Collapse
No announcement yet.

Adhoc transaction Issue

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adhoc transaction Issue

    I'm getting a lot of these error messages.

    org.springframework.jdbc.UncategorizedSQLException : PreparedStatementCallback; uncategorized SQLException for SQL [delete from oauth_access_token where expiration <?]; SQL state [s1000]; error code [0]; General Provider Error (USER_ABORT): 'VOLTDB ERROR: USER ABORT
    AdHoc transaction 3620874174578687 wasn't planned against the current catalog version.

    How can I correct them?

    Thanks
    Joe

  • #2
    This typically happens when some new DDL has been applied and the planning for your adhoc statement has happened concurrently. By the time the newly compiled SQL is tried, it finds that the schema, procedures or deployment is changed, so it can't run. You can just rerun the same transaction if you get this error.

    To avoid this, we recommend a few things:
    1) Use stored procedures. Not only are they faster, but they also can't fall into this trap, since there is no extra compilation step. See https://docs.voltdb.com/UsingVoltDB/ProgLangjdbc.php for an example of doing this in JDBC.

    2) When you are updating your schema, use batching in sqlcmd. See the information about batching in https://docs.voltdb.com/UsingVoltDB/clisqlcmd.php. Doing all your updates in a batch will cause less disruption to any other running clients by compiling all the statements, then doing the updates atomically. Rather than 1 DDL statement at a time.

    3) If it still happens a lot, try to do these updates at off-peak times (or even stop your client activity).

    Ruth

    Comment


    • #3
      I'm using Spring so I don't have access to the SQL.

      Comment


      • #4
        I'm using Spring so I don't have access to the SQL.

        Comment


        • #5
          We have an example of using Spring with VoltDB. See https://github.com/VoltDB/example-spring-jdbc.

          Comment

          Working...
          X