提交 c07be272 编写于 作者: N Nikos Armenatzoglou

Adding functionality to enable retrieving the number of evicted objects from...

Adding functionality to enable retrieving the number of evicted objects from MDCache for testing purposes
上级 6367ef62
......@@ -19,6 +19,8 @@
#include "gpopt/utils/nodeutils.h"
#include "gpopt/utils/CCatalogUtils.h"
#include "gpopt/utils/COptTasks.h"
#include "gpopt/mdcache/CMDCache.h"
#include "utils/guc.h"
#include "gpos/_api.h"
#include "gpos/io/CFileReader.h"
......@@ -1341,3 +1343,27 @@ PlannedStmt *orca(Query *pquery)
return COptTasks::PplstmtOptimize(pquery, &fUnexpectedFailure);
}
}
//---------------------------------------------------------------------------
// @function:
// GetCacheEvictionCounter
//
// @doc:
// Get the number of times we evicted entries from CMDCache.
// This function is called by udfs for testing purposes.
//
//---------------------------------------------------------------------------
extern "C"
{
ULLONG
GetCacheEvictionCounter()
{
if (!CMDCache::FInitialized())
{
CMDCache::Init();
CMDCache::SetCacheQuota(optimizer_mdcache_size * 1024L);
}
return CMDCache::ULLGetCacheEvictionCounter();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册