Permalink
Browse files

Update physical recovery

  • Loading branch information...
jarulraj committed Mar 19, 2014
1 parent 3e3f407 commit d3524a08c6874fc41e2f8e91821ec34e31907cea
@@ -1728,8 +1728,9 @@ void VoltDBEngine::doAriesRecovery(char *logData, size_t length, int64_t replay_
long microseconds = (tv2.tv_sec - tv1.tv_sec) * 1000000 + ((int)tv2.tv_usec - (int)tv1.tv_usec);
long milliseconds = microseconds/1000;
VOLT_INFO("ARIES : ######################### Recovery Latency : completed in %ld ms", milliseconds);
VOLT_INFO("ARIES : ######################### Recovery Completed : %d log records replayed", counter);
// XXX Just print it
VOLT_ERROR("ARIES : ######################### Recovery Latency : completed in %ld ms", milliseconds);
VOLT_ERROR("ARIES : ######################### Recovery Completed : %d log records replayed", counter);
std::ostringstream sstm;
sstm << counter;
@@ -182,24 +182,22 @@ bool DeleteExecutor::p_execute(const NValueArray &params, ReadWriteTracker *trac
TableTuple *keyTuple = NULL;
char *keydata = NULL;
/*
// See if we use an index instead
TableIndex *index = m_targetTable->primaryKeyIndex();
// See if we use an index instead
TableIndex *index = m_targetTable->primaryKeyIndex();
if (index != NULL) {
// First construct tuple for primary key
keydata = new char[index->getKeySchema()->tupleLength()];
keyTuple = new TableTuple(keydata, index->getKeySchema());
if (index != NULL) {
// First construct tuple for primary key
keydata = new char[index->getKeySchema()->tupleLength()];
keyTuple = new TableTuple(keydata, index->getKeySchema());
for (int i = 0; i < index->getKeySchema()->columnCount(); i++) {
keyTuple->setNValue(i, beforeImage->getNValue(index->getColumnIndices()[i]));
}
for (int i = 0; i < index->getKeySchema()->columnCount(); i++) {
keyTuple->setNValue(i, beforeImage->getNValue(index->getColumnIndices()[i]));
}
// no before image need be recorded, just the primary key
beforeImage = NULL;
}
*/
// no before image need be recorded, just the primary key
beforeImage = NULL;
}
LogRecord *logrecord = new LogRecord(computeTimeStamp(),
LogRecord::T_DELETE,// this is a delete record
@@ -208,23 +208,24 @@ static public Test suite() {
e.printStackTrace();
}
// CONFIG #1: 2 Local Site with 4 Partitions running on JNI backend
// CONFIG #1: 2 Local Site with 4 Partitions running on JNI backend
/*
NUM_SITES = 2;
NUM_PARTITIONS = 2;
m_config = new LocalCluster(projectJAR, NUM_SITES, NUM_PARTITIONS, 1, BackendTarget.NATIVE_EE_JNI);
success = m_config.compile(project);
assert (success);
builder.addServerConfig(m_config);
builder.addServerConfig(m_config);
*/
// CONFIG #2: 1 Local Site with 1 Partitions running on JNI backend
/*
// CONFIG #2: 1 Local Site with 2 Partitions running on JNI backend
NUM_SITES = 1;
NUM_PARTITIONS = 1;
NUM_PARTITIONS = 2;
m_config = new LocalSingleProcessServer(projectJAR, NUM_PARTITIONS, BackendTarget.NATIVE_EE_JNI);
success = m_config.compile(project);
assert (success);
builder.addServerConfig(m_config);
*/
return builder;
}
@@ -64,7 +64,7 @@
// YCSB
private static final String PREFIX = "ycsb";
private static int NUM_TRANSACTIONS = 100000;
private static int NUM_TRANSACTIONS = 1000;
private static final String projectJAR = "physical_" + PREFIX + ".jar";
public TestYCSBPhysicalRecovery(String name) {
@@ -224,22 +224,23 @@ static public Test suite() {
}
// CONFIG #1: 2 Local Site with 4 Partitions running on JNI backend
/*
NUM_SITES = 2;
NUM_PARTITIONS = 2;
m_config = new LocalCluster(projectJAR, NUM_SITES, NUM_PARTITIONS, 1, BackendTarget.NATIVE_EE_JNI);
success = m_config.compile(project);
assert (success);
builder.addServerConfig(m_config);
*/
// CONFIG #2: 1 Local Site with 1 Partitions running on JNI backend
/*
// CONFIG #2: 1 Local Site with 1 Partitions running on JNI backend
NUM_SITES = 1;
NUM_PARTITIONS = 1;
NUM_PARTITIONS = 2;
m_config = new LocalSingleProcessServer(projectJAR, NUM_PARTITIONS, BackendTarget.NATIVE_EE_JNI);
success = m_config.compile(project);
assert (success);
builder.addServerConfig(m_config);
*/
return builder;
}

0 comments on commit d3524a0

Please sign in to comment.