1

I'm using below piece of code which takes about 8 microseconds per transaction.

voltdb::Procedure procedure("test.Insert", parameterTypes);

voltdb::InvocationResponse response;
voltdb::ParameterSet* params = procedure.params();

int trans = 100000;

for(i=0;i<trans;i++) {
    params->addInt64(i).addString("Hello");
    client.invoke(procedure, new FunctionCallback);
}
    client.run();

The problem I have is, if the number of transactions is 1000, it won't push them to database without executing client.run();.

The load can be variable, at times 100000 transactions per second and at times merely 10 transactions per second. If I call "client.run()" after every transaction its not asynchronous per my understanding and it takes over 280 microseconds which isn't acceptable in my case.

I'll have about 5 threads reading/writing to voltdb at all times and each thread needs accurate data at all times. If the data is not written until a specific number of records (1940 records in my case), then other threads may not find it.

How can I keep per operation transaction time under 10 microseconds?

bcperth
  • 2,191
  • 1
  • 10
  • 16
qasim
  • 11
  • 1

0 Answers0