Skip to content

Commit

Permalink
Checkpoint before tests
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Apr 17, 2014
1 parent 2574afb commit 59579e6
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 845 deletions.
7 changes: 0 additions & 7 deletions build.py
Expand Up @@ -385,13 +385,6 @@
if CTX.ARIES:
CTX.CPPFLAGS += " -DARIES"

###############################################################################
# SNAPSHOT
###############################################################################

if CTX.SNAPSHOT:
CTX.CPPFLAGS += " -DSNAPSHOT"

###############################################################################
# ANTI-CACHING
###############################################################################
Expand Down
14 changes: 5 additions & 9 deletions buildtools.py
Expand Up @@ -41,12 +41,11 @@ def __init__(self, args):
self.LOG_LEVEL = "DEBUG"
self.VOLT_LOG_LEVEL = None
self.STORAGE_MMAP = False
self.ANTICACHE_BUILD = False
self.ANTICACHE_REVERSIBLE_LRU = False
self.ANTICACHE_NVM = False
self.ANTICACHE_DRAM = False
self.ARIES= False
self.SNAPSHOT= False
self.ANTICACHE_BUILD = True
self.ANTICACHE_REVERSIBLE_LRU = True
self.ANTICACHE_NVM = True
self.ANTICACHE_DRAM =True
self.ARIES= True

for arg in [x.strip().upper() for x in args]:
if arg in ["DEBUG", "RELEASE", "MEMCHECK", "MEMCHECK_NOFREELIST"]:
Expand All @@ -67,9 +66,6 @@ def __init__(self, args):
if arg.startswith("ARIES="):
parts = arg.split("=")
if len(parts) > 1 and not (parts[1].startswith("${")): self.ARIES = bool(parts[1])
if arg.startswith("SNAPSHOT="):
parts = arg.split("=")
if len(parts) > 1 and not (parts[1].startswith("${")): self.ARIES = bool(parts[1])
if arg.startswith("ANTICACHE_ENABLE="):
parts = arg.split("=")
if len(parts) > 1 and not (parts[1].startswith("${")): self.ANTICACHE_ENABLE = bool(parts[1])
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/org/voltdb/SnapshotSaveAPI.java
Expand Up @@ -129,7 +129,7 @@ public VoltTable startSnapshotting(String file_path, String file_nonce, byte blo

if (failures.isEmpty()) {
blockingResult.addRow(
Integer.parseInt(context.getSite().getHost().getTypeName()),
Integer.parseInt(context.getSite().getHost().getTypeName().replaceAll("[\\D]", "")),
hostname,
context.getHStoreSite().getSiteId(),
context.getPartitionExecutor().getPartitionId(),
Expand All @@ -142,7 +142,7 @@ public VoltTable startSnapshotting(String file_path, String file_nonce, byte blo
err = e.toString();
}
blockingResult.addRow(
Integer.parseInt(context.getSite().getHost().getTypeName()),
Integer.parseInt(context.getSite().getHost().getTypeName().replaceAll("[\\D]", "")),
hostname,
context.getHStoreSite().getSiteId(),
context.getPartitionExecutor().getPartitionId(),
Expand Down Expand Up @@ -291,7 +291,7 @@ public SnapshotRegistry.Snapshot.Table update(
"RESULTED IN IOException: \n" + sw.toString();
}

result.addRow(Integer.parseInt(context.getSite().getHost().getTypeName()),
result.addRow(Integer.parseInt(context.getSite().getHost().getTypeName().replaceAll("[\\D]", "")),
hostname,
context.getHStoreSite().getSiteId(),
context.getPartitionExecutor().getPartitionId(),
Expand Down Expand Up @@ -387,7 +387,7 @@ private VoltTable acquireSnapshotPermit(SystemProcedureExecutionContext context,
try {
SnapshotSiteProcessor.m_snapshotPermits.acquire();
} catch (Exception e) {
result.addRow(Integer.parseInt(context.getSite().getHost().getTypeName()),
result.addRow(Integer.parseInt(context.getSite().getHost().getTypeName().replaceAll("[\\D]", "")),
hostname,
context.getHStoreSite().getSiteId(),
context.getPartitionExecutor().getPartitionId(),
Expand Down Expand Up @@ -424,7 +424,7 @@ private final SnapshotDataTarget constructSnapshotDataTargetForTable(
throws IOException
{
return new DefaultSnapshotDataTarget(f,
Integer.parseInt(h.getTypeName()),
Integer.parseInt(h.getTypeName().replaceAll("[\\D]", "")),
context.getCluster().getTypeName(),
context.getDatabase().getTypeName(),
table.getTypeName(),
Expand Down
5 changes: 0 additions & 5 deletions src/frontend/org/voltdb/catalog/Host.java
Expand Up @@ -21,8 +21,6 @@

package org.voltdb.catalog;

import org.voltdb.sysprocs.saverestore.SnapshotUtil;

/**
* A single host participating in the cluster
*/
Expand All @@ -37,9 +35,6 @@ public class Host extends CatalogType {

void setBaseValues(Catalog catalog, CatalogType parent, String path, String name) {
super.setBaseValues(catalog, parent, path, name);

// remove chars - for consumers of HostId that need it be a strictly digits only
m_typename = m_typename.replaceAll("[\\D]", "");

m_fields.put("id", m_id);
m_fields.put("ipaddr", m_ipaddr);
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/org/voltdb/sysprocs/SnapshotDelete.java
Expand Up @@ -98,7 +98,7 @@ public void initImpl() {
List<File> relevantFiles = retrieveRelevantFiles(paths[ii], nonces[ii]);
if (relevantFiles == null) {
result.addRow(
Integer.parseInt(context.getSite().getHost().getTypeName()),
Integer.parseInt(context.getSite().getHost().getTypeName().replaceAll("[\\D]", "")),
hostname,
paths[ii],
nonces[ii],
Expand All @@ -111,8 +111,8 @@ public void initImpl() {
for (final File f : relevantFiles) {
long size = f.length();
boolean deleted = f.delete();
result.addRow(
Integer.parseInt(context.getSite().getHost().getTypeName()),
result.addRow(
Integer.parseInt(context.getSite().getHost().getTypeName().replaceAll("[\\D]", "")),
hostname,
paths[ii],
nonces[ii],
Expand Down

0 comments on commit 59579e6

Please sign in to comment.