Skip to content

Commit

Permalink
Fix the mmap dir of the memory pool of NVMEvictedTable.
Browse files Browse the repository at this point in the history
  • Loading branch information
linmagit committed Nov 29, 2015
1 parent 5e1cd49 commit 074da8d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ee/anticache/AntiCacheDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ class AntiCacheDB {
return evictedTupleInBlock[blockId];
}

inline string getDBDir() {
return m_dbDir;
}

protected:
ExecutorContext *m_executorContext;
string m_dbDir;
Expand Down
8 changes: 7 additions & 1 deletion src/ee/anticache/NVMEvictedTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down
4 changes: 2 additions & 2 deletions src/ee/common/executorcontext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 074da8d

Please sign in to comment.