Uploaded image for project: 'Engineering'
  1. Engineering
  2. ENG-3443

Improve error message when planning replicated update in SP procedure

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: IT20-v2.7.2
    • Fix Version/s: Backlog, Groomed Backlog
    • Component/s: Core
    • Labels:
      None
    • Story Points:
      3

      Description

      See http://community.voltdb.com/node/1341#comment-2936

      Fix error and unit test. Looks like a bad error.

      Some uncertainty re this diagnosis: the error message is caused by asking the planner to plan an UPDATE of a replicated table in a single partition procedure.

      2012-07-23 09:56:45,472 INFO [main] COMPILER: [procedures.modules.assets.admin_getAll]: Compiling Statement: SELECT * FROM assets WHERE deleted=0;
      2012-07-23 09:56:45,484 INFO [main] COMPILER: [procedures.modules.assets.admin_search]: Compiling Statement: SELECT * FROM assets WHERE deleted=0 AND name LIKE ? LIMIT 25;
      2012-07-23 09:56:45,509 INFO [main] COMPILER: [admin_upsert.class]: Compiling Statement: UPDATE assets SET type = ?, name = ?, url = ?, deleted = ? WHERE assetID = ?;
      2012-07-23 09:56:45,510 ERROR [main] COMPILER: [admin_upsert.class]: Failed to plan for stmt: updateStmt
      2012-07-23 09:56:45,511 ERROR [main] COMPILER: Failed to compile XML
      2012-07-23 09:56:45,511 ERROR [main] COMPILER: Catalog compilation failed.

      The above was placed into a procedure as you can see.

      The table defined in my ddl.sql as:

      CREATE TABLE assets (
      assetID BIGINT UNIQUE NOT NULL,
      type TINYINT NOT NULL,
      name VARCHAR(100) NOT NULL,
      url VARCHAR(225) NOT NULL,
      deleted TINYINT DEFAULT '0' NOT NULL,
      CONSTRAINT IDX_assets_PK PRIMARY KEY (assetID)
      );

      Adding the following to my project.xml solved the issue:

      [partitions]
      ...
      [partition table='assets' column='assetID' /]
      ...
      [/partitions]

      (This forum is making my < and > brackets hide the content, I had to change them to square brackets)

        Attachments

          Activity

            People

            • Assignee:
              rbetts Ryan Betts
              Reporter:
              rbetts Ryan Betts
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support