Forum: Building VoltDB Applications

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

How to suppress stored procedure warnings in the Volt web admin interface?
cfogelberg
Feb 18, 2016
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.
cfogelberg
Feb 18, 2016
Addendum: https://issues.voltdb.com/browse/ENG-6953 seems to be relevant, but it was last updated in September 2014.
pzhao
Feb 18, 2016
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
cfogelberg
Feb 25, 2016
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:
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:

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
pzhao
Feb 25, 2016
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.
101
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
cfogelberg
Feb 26, 2016
Ok thanks Peter