diff --git a/src/ee/anticache/AntiCacheDB.h b/src/ee/anticache/AntiCacheDB.h index e27aec5711..1b715979b8 100644 --- a/src/ee/anticache/AntiCacheDB.h +++ b/src/ee/anticache/AntiCacheDB.h @@ -315,6 +315,10 @@ class AntiCacheDB { return evictedTupleInBlock[blockId]; } + inline string getDBDir() { + return m_dbDir; + } + protected: ExecutorContext *m_executorContext; string m_dbDir; diff --git a/src/ee/anticache/NVMEvictedTable.cpp b/src/ee/anticache/NVMEvictedTable.cpp index a26936ca54..0bff02a2cd 100644 --- a/src/ee/anticache/NVMEvictedTable.cpp +++ b/src/ee/anticache/NVMEvictedTable.cpp @@ -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); } diff --git a/src/ee/common/executorcontext.hpp b/src/ee/common/executorcontext.hpp index 0d2296729e..615182401e 100644 --- a/src/ee/common/executorcontext.hpp +++ b/src/ee/common/executorcontext.hpp @@ -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); }