Forum: Building VoltDB Clients

Post: C++ Client - exit Client::run()

C++ Client - exit Client::run()
phealy
Feb 20, 2013
To avoid someone else spending time on this.

The doc has:

"Using VoltDB", version January 21, 2013.

15.1.4. Invoking Stored Procedures Asynchronously
...
The run() method waits for and processes network requests, responses, and callbacks until told not to.
(That is, until a callback returns a value of false.)
...


But the comment in the headers (correct):

voltdb-client-cpp-x86_64-2.5/include/ProcedureCallback.hpp:
...
* @return true if the event loop should break after invoking this callback, false otherwise
...


Also wrong:

voltdb-client-cpp-x86_64-2.5/include/Client.h:

... Returns immediately after performing
* all available work, or after the loop is broken by a callback.
...
void run() throw (voltdb::NoConnectionsException, voltdb::LibEventException, voltdb::Exception);


And correct:

voltdb-client-cpp-x86_64-2.5/examples/AsyncHelloWorld.cpp:

...
//If the callback has been invoked count times, return true to break event loop
if (m_count == 0) {
return true;
...


Paul
rbetts
Feb 20, 2013
Paul,

Thank you for this defect report. You can track the status here if interested:

https://issues.voltdb.com/browse/ENG-4401

Ryan.
rbetts
Feb 20, 2013
Paul,

Thank you for this defect report. You can track the status here if interested:

https://issues.voltdb.com/browse/ENG-4401

Ryan.