Announcement

Collapse
No announcement yet.

How to suppress stored procedure warnings in the Volt web admin interface?

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

  • How to suppress stored procedure warnings in the Volt web admin interface?

    How can I suppress warnings about non-deterministic stored procedure results from appearing in the Volt web admin interface? This is important for system administration by non-developers of the product we are developing. We are using Volt 5.8.1.

    E.g. a stored procedure with a single statement, "SELECT * FROM FOO WHERE ID = ?", generates the warning:
    Procedure FooReader has a statement with a non-deterministic result - statement: "SELECT * FROM FOO WHERE ID = ?", reason: the query result does not guarantee a consistent ordering

    In this case I know that any inconsistent ordering causes no problems in the client code.

  • #2
    Addendum: https://issues.voltdb.com/browse/ENG-6953 seems to be relevant, but it was last updated in September 2014.

    Comment


    • #3
      cfogelberg,
      This has been tested on v5.8.1 and it's working as expected with no warning messages being printed. Could you please provide the steps to reproduce this behavior and any relevant code.
      Peter Zhao

      Comment


      • #4
        Hi Peter,

        Sorry about the slow reply here. The ID column is not a key and has no index associated with it. I'd be the first to agree it isn't the best-named column. The following reproduces the problem:

        In Java:
        Code:
        package com.foo;
        
        import org.voltdb.SQLStmt;
        import org.voltdb.VoltProcedure;
        import org.voltdb.VoltTable;
        
        public class SelectOnIdDefinedInJava extends VoltProcedure {
          private final SQLStmt sql = new SQLStmt("SELECT * FROM foo WHERE ID = ?");
          public VoltTable[] run(int id) {
            voltQueueSQL(sql, id);
            VoltTable[] selectedTable = voltExecuteSQL(true);
            return selectedTable;
          }
        }
        Then in a SQL file:

        Code:
        LOAD CLASSES /path/to/foo/jar/foo.jar;
        
        CREATE TABLE foo (
          the_actual_id INTEGER NOT NULL,
          id INTEGER NOT NULL,
          CONSTRAINT pk_foo PRIMARY KEY (the_actual_id)
        );
        PARTITION TABLE foo ON COLUMN the_actual_id;
        
        CREATE PROCEDURE SelectOnIdDefinedInSql AS
        SELECT * FROM foo WHERE id = ?;
        
        CREATE PROCEDURE
        FROM CLASS com.foo.SelectOnIdDefinedInJava;
        In the VoltDB web administration interface there is one warning, for SelectOnIdDefinedInJava: "Procedure SelectOnIdDefinedInJava has a statement with a non-deterministic result - statement: "SELECT * FROM foo WHERE id = ?;", reason: the query result does not guarantee a consistent ordering"

        Because SelectOnIdDefinedInJava will always be used in a narrow manner, the non-determinism is not a problem and I want to be able to suppress the warning. Is that possible? (for business reasons it might not be possible to define an index or add an ORDER BY to the query, though I realise that would just fix the problem)

        Additionally, shouldn't SelectOnIdDefinedInSql generate the warning as well?

        Christo
        Last edited by cfogelberg; 02-25-2016, 05:50 AM. Reason: Grammar fix, minor clarification of text

        Comment


        • #5
          cfogelberg,
          Currently, there's no way to suppress this output but we do have a ticket for suppressing on a per statement basis. Regarding SelectOnIdDefinedInSql, this warning is generated as well, just not interactively.
          Screen Shot 2016-02-25 at 11.33.14 AM.jpg
          In VMC, under the schema tab > procedures & sql, you'll find all your stored procedures. Expanding on a stored procedure, you'll find an attributes column which will display determinism warning.
          Peter Zhao

          Comment


          • #6
            Ok thanks Peter

            Comment

            Working...
            X