Forum: Building VoltDB Applications

Post: queued execution problem in 1.3

queued execution problem in 1.3
David Best
Apr 28, 2011
In upgrading from VoltDB 1.2.1.02 to 1.3.01, we have run into an SQL execution problem, demonstrated by this simple example:

CREATE TABLE test_table { /* replicated */ id bigint NOT NULL, PRIMARY KEY (id) }; @ProcInfo(singlePartition = false) public class test extends VoltProcedure { public final SQLStmt selectId = new SQLStmt("SELECT * FROM test_table WHERE id = ?;"); public final SQLStmt deleteId = new SQLStmt("DELETE FROM test_table WHERE id = ?;"); public VoltTable run(long Id) throws VoltAbortException { voltQueueSQL(selectId, Id); voltQueueSQL(deleteId, Id); VoltTable[] results = voltExecuteSQL(); return results[0]; } } Assuming there is an existing row:
In VoltDB 1.2, the result from the select is a VoltTable with one row.
In VoltDB 1.3, the result from the select is an empty VoltTable...acting like the delete was executed before the select.
If I insert a voltExecuteSQL between the two voltQueueSQL calls:

public VoltTable run(long Id) throws VoltAbortException { voltQueueSQL(selectId, Id); VoltTable[] results = voltExecuteSQL(); voltQueueSQL(deleteId, Id); voltExecuteSQL(); return results[0]; } then the correct result is returned.
Hi David. Thanks for
aweisberg
Apr 29, 2011
Hi David.
Thanks for reporting this. I was able to reproduce the bug in 1.3 and not in 1.2.1 as you described. The ticket is https://issues.voltdb.com/browse/ENG-1232
-Ariel