Source:
@Test public void testMultiBlockSnapshotRestore() throws Exception { String ddl = "create table t (s1 varchar(1048576), s2 varchar(1048560));\n"; org.voltdb.utils.VoltFile.resetSubrootForThisProcess(); VoltProjectBuilder builder = new VoltProjectBuilder(); builder.addLiteralSchema(ddl); int sitesPerHost = 4, hostCount = 4, kFactor = 3; LocalCluster cluster = new LocalCluster("eng15174.jar", sitesPerHost, hostCount, kFactor, BackendTarget.NATIVE_EE_JNI); cluster.overrideAnyRequestForValgrind(); assertTrue(cluster.compile(builder)); MiscUtils.copyFile(builder.getPathToDeployment(), VoltDB.Configuration.getPathToCatalogForTest("rejoin.xml")); cluster.setHasLocalServer(false); cluster.startUp(); Client client = cluster.createClient(new ClientConfig()); NullCallback callback = new NullCallback(); m_logger.info("Inserting some rows into table T."); String text = String.join("", Collections.nCopies(1048560, "a")); for (int i = 1; i <= 30; i++) { client.callProcedure(callback, "T.insert", text, text); } client.drain(); assertEquals(30, client.callProcedure("@AdHoc", "SELECT COUNT(*) FROM T;").getResults()[0].asScalarLong()); m_logger.info("Kill node 1 and 2"); cluster.killSingleHost(1); cluster.killSingleHost(2); Thread.sleep(1000); m_logger.info("Take a snapshot."); client.callProcedure("@SnapshotSave", "{nonce:\"eng15174\",block:true}"); m_logger.info("Shutdown the cluster."); client.close(); cluster.shutDown(); m_logger.info("Recover the cluster."); cluster.startUp(false); client = cluster.createClient(new ClientConfig()); assertEquals(30, client.callProcedure("@AdHoc", "SELECT COUNT(*) FROM T;").getResults()[0].asScalarLong()); }

Target:
public void testMultiBlockSnapshotRestore() throws Exception { String ddl = "create table t (s1 varchar(1048576), s2 varchar(1048560));\n"; org.voltdb.utils.VoltFile.resetSubrootForThisProcess(); VoltProjectBuilder builder = new VoltProjectBuilder(); builder.addLiteralSchema(ddl); int sitesPerHost = 4, hostCount = 4, kFactor = 3; LocalCluster cluster = new LocalCluster("eng15174.jar", sitesPerHost, hostCount, kFactor, BackendTarget.NATIVE_EE_JNI); cluster.overrideAnyRequestForValgrind(); assertTrue(cluster.compile(builder)); MiscUtils.copyFile(builder.getPathToDeployment(), VoltDB.Configuration.getPathToCatalogForTest("rejoin.xml")); cluster.setHasLocalServer(false); cluster.startUp(); Client client = cluster.createClient(new ClientConfig()); NullCallback callback = new NullCallback(); System.out.println("Inserting some rows into table T."); String text = String.join("", Collections.nCopies(1048560, "a")); for (int i = 1; i <= 30; i++) { client.callProcedure(callback, "T.insert", text, text); } client.drain(); assertEquals(30, client.callProcedure("@AdHoc", "SELECT COUNT(*) FROM T;").getResults()[0].asScalarLong()); System.out.println("Kill node 1 and 2"); cluster.killSingleHost(1); cluster.killSingleHost(2); Thread.sleep(1000); System.out.println("Take a snapshot."); client.callProcedure("@SnapshotSave", "{nonce:\"eng15174\",block:true}"); System.out.println("Shutdown the cluster."); client.close(); cluster.shutDown(); System.out.println("Recover the cluster."); cluster.startUp(false); client = cluster.createClient(new ClientConfig()); assertEquals(30, client.callProcedure("@AdHoc", "SELECT COUNT(*) FROM T;").getResults()[0].asScalarLong()); }