Forum: Building VoltDB Applications

Post: How to increase k-safety on a live database ?

How to increase k-safety on a live database ?
gambitg
Oct 20, 2011
I built a standalone database (host=1,k=0) and populated with lots of data. Now I wish to increase k=1 and host=2.

I thought the following will work:
1. Backup the database.(host=1,k=0)
2. Shut the db down
3. Change deployment file(host=2,k=1)
4. Start the db again (both the nodes)
5. Restore the backup taken in step#1.

Fist 4 are fine but the restore fails in Step5 with the following listed error. Any idea on how to accomplish this ? (Note, I don't wish to lose the data that I had initially inserted into the standalone database).

Using VoltDB2.0, enterprise trial edition.

org.voltdb.client.ProcCallException: VOLTDB ERROR: UNEXPECTED FAILURE:
java.lang.NullPointerException
at org.voltdb.sysprocs.SnapshotRestore.executePlanFragment(SnapshotRestore.java:435)
at org.voltdb.ExecutionSite.processSysprocFragmentTask(ExecutionSite.java:1860)
at org.voltdb.ExecutionSite.processFragmentTask(ExecutionSite.java:2173)
at org.voltdb.dtxn.MultiPartitionParticipantTxnState.processFragmentWork(MultiPartitionParticipantTxnState.java:295)
at org.voltdb.dtxn.MultiPartitionParticipantTxnState.doWork(MultiPartitionParticipantTxnState.java:210)
at org.voltdb.ExecutionSite.recursableRun(ExecutionSite.java:2022)
at org.voltdb.ExecutionSite.run(ExecutionSite.java:1050)
at org.voltdb.RealVoltDB.run(RealVoltDB.java:940)
at org.voltdb.VoltDB.main(VoltDB.java:485)

at org.voltdb.client.ClientImpl.callProcedure(ClientImpl.java:218)
at BackupRestore.main(BackupRestore.java:15)
Caused by: org.voltdb.exceptions.SerializableException: java.lang.NullPointerException
at org.voltdb.sysprocs.SnapshotRestore.executePlanFragment(SnapshotRestore.java:435)
at org.voltdb.ExecutionSite.processSysprocFragmentTask(ExecutionSite.java:1860)
at org.voltdb.ExecutionSite.processFragmentTask(ExecutionSite.java:2173)
at org.voltdb.dtxn.MultiPartitionParticipantTxnState.processFragmentWork(MultiPartitionParticipantTxnState.java:295)
at org.voltdb.dtxn.MultiPartitionParticipantTxnState.doWork(MultiPartitionParticipantTxnState.java:210)
at org.voltdb.ExecutionSite.recursableRun(ExecutionSite.java:2022)
at org.voltdb.ExecutionSite.run(ExecutionSite.java:1050)
at org.voltdb.RealVoltDB.run(RealVoltDB.java:940)
at org.voltdb.VoltDB.main(VoltDB.java:485)
at org.voltdb.exceptions.SerializableException$SerializableExceptions$5.deserializeException(SerializableException.java:77)
at org.voltdb.exceptions.SerializableException.deserializeFromBuffer(SerializableException.java:184)
at org.voltdb.ClientResponseImpl.readExternal(ClientResponseImpl.java:173)
at org.voltdb.messaging.FastDeserializer.readObject(FastDeserializer.java:114)
at org.voltdb.client.Distributer$NodeConnection.handleMessage(Distributer.java:246)
at org.voltdb.network.VoltPort.call(VoltPort.java:151)
at org.voltdb.network.VoltNetwork$3.run(VoltNetwork.java:554)
at org.voltdb.network.VoltNetwork.invokeCallbacks(VoltNetwork.java:588)
at org.voltdb.network.VoltNetwork.run(VoltNetwork.java:407)
at java.lang.Thread.run(Thread.java:636)
Exception in thread "main" java.lang.NullPointerException
at BackupRestore.main(BackupRestore.java:21)
Hi Gambit, Sorry about that.
aweisberg
Oct 20, 2011
Hi Gambit,

Sorry about that. That bug was just fixed in this iteration and should be in the next release. https://issues.voltdb.com/browse/ENG-961

The work around is to make sure that the directory containing the snapshot exists on both servers.
-Ariel