Permalink
Browse files

Fix the mmap dir of the memory pool of NVMEvictedTable.

  • Loading branch information...
malin1993ml committed Nov 29, 2015
1 parent 5e1cd49 commit 074da8d7dac25b5e12c5e76c67a1fa40ebcd4982
Showing with 13 additions and 3 deletions.
  1. +4 −0 src/ee/anticache/AntiCacheDB.h
  2. +7 −1 src/ee/anticache/NVMEvictedTable.cpp
  3. +2 −2 src/ee/common/executorcontext.hpp
@@ -315,6 +315,10 @@ class AntiCacheDB {
return evictedTupleInBlock[blockId];
}
inline string getDBDir() {
return m_dbDir;
}
protected:
ExecutorContext *m_executorContext;
string m_dbDir;
@@ -33,7 +33,13 @@ namespace voltdb {
NVMEvictedTable::NVMEvictedTable(ExecutorContext *ctx, const std::string name) : PersistentTable(ctx, false) {
delete m_pool;
m_pool = new Pool(1024 * 1024 * 1024, 1024, m_executorContext->getDBDir() + "/" + name, true);
std::string dbName;
if (m_executorContext->getAntiCacheDB(0)->getDBType() == ANTICACHEDB_ALLOCATORNVM)
dbName = m_executorContext->getAntiCacheDB(0)->getDBDir();
else
dbName = m_executorContext->getDBDir();
//VOLT_ERROR("dbname: %s\n", dbName.c_str());
m_pool = new Pool(1024 * 1024 * 1024, 1024, dbName + "/" + name, true);
}
@@ -124,8 +124,8 @@ namespace voltdb {
inline std::string getDBDir() const {
if (m_MMAPDir.empty())
return "/mnt/pmfs/mmap_file"; // Default : "/tmp"
//return "/tmp"; // Default : "/tmp"
//return "/mnt/pmfs/mmap_file"; // Default : "/tmp"
return "/tmp"; // Default : "/tmp"
return (m_MMAPDir);
}

0 comments on commit 074da8d

Please sign in to comment.