You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Deep build refactoring phase 2 (#3564)
* configcpp refactored * chore(build): massive removals, auto add files to debian install file * chore(build): configure before autobake * chore(build): use custom cmake commands for components, mariadb-plugin-columnstore.install generated * chore(build): install deps as separate step for build-packages * more deps * chore(codemanagement, build): build refactoring stage2 * chore(safety): Locked Map for MessageqCpp with a simpler way Please enter the commit message for your changes. Lines starting * chore(codemanagement, ci): better coredumps handling, deps fixed * Delete build/bootstrap_mcs.py * Update charset.cpp (add license)
This commit is contained in:
@ -56,76 +56,77 @@
|
||||
#include "dbrm.h"
|
||||
|
||||
#include "mariadb_my_sys.h"
|
||||
#include "statistics.h"
|
||||
#include "statistics_manager/statistics.h"
|
||||
#include "serviceexemgr.h"
|
||||
|
||||
namespace exemgr
|
||||
{
|
||||
class SQLFrontSessionThread
|
||||
class SQLFrontSessionThread
|
||||
{
|
||||
public:
|
||||
SQLFrontSessionThread(const messageqcpp::IOSocket& ios, joblist::DistributedEngineComm* ec,
|
||||
joblist::ResourceManager* rm)
|
||||
: fIos(ios)
|
||||
, fEc(ec)
|
||||
, fRm(rm)
|
||||
, fStatsRetrieved(false)
|
||||
, fTeleClient(globServiceExeMgr->getTeleServerParms())
|
||||
, fOamCachePtr(oam::OamCache::makeOamCache())
|
||||
{
|
||||
public:
|
||||
SQLFrontSessionThread(const messageqcpp::IOSocket& ios, joblist::DistributedEngineComm* ec,
|
||||
joblist::ResourceManager* rm)
|
||||
: fIos(ios)
|
||||
, fEc(ec)
|
||||
, fRm(rm)
|
||||
, fStatsRetrieved(false)
|
||||
, fTeleClient(globServiceExeMgr->getTeleServerParms())
|
||||
, fOamCachePtr(oam::OamCache::makeOamCache())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
messageqcpp::IOSocket fIos;
|
||||
joblist::DistributedEngineComm* fEc;
|
||||
joblist::ResourceManager* fRm;
|
||||
querystats::QueryStats fStats;
|
||||
private:
|
||||
messageqcpp::IOSocket fIos;
|
||||
joblist::DistributedEngineComm* fEc;
|
||||
joblist::ResourceManager* fRm;
|
||||
querystats::QueryStats fStats;
|
||||
|
||||
// Variables used to store return stats
|
||||
bool fStatsRetrieved;
|
||||
// Variables used to store return stats
|
||||
bool fStatsRetrieved;
|
||||
|
||||
querytele::QueryTeleClient fTeleClient;
|
||||
querytele::QueryTeleClient fTeleClient;
|
||||
|
||||
oam::OamCache* fOamCachePtr; // this ptr is copyable...
|
||||
oam::OamCache* fOamCachePtr; // this ptr is copyable...
|
||||
|
||||
//...Reinitialize stats for start of a new query
|
||||
void initStats(uint32_t sessionId, std::string& sqlText)
|
||||
{
|
||||
initMaxMemPct(sessionId);
|
||||
//...Reinitialize stats for start of a new query
|
||||
void initStats(uint32_t sessionId, std::string& sqlText)
|
||||
{
|
||||
initMaxMemPct(sessionId);
|
||||
|
||||
fStats.reset();
|
||||
fStats.setStartTime();
|
||||
fStats.fSessionID = sessionId;
|
||||
fStats.fQuery = sqlText;
|
||||
fStatsRetrieved = false;
|
||||
}
|
||||
//...Get % memory usage during latest query for sesssionId.
|
||||
//...SessionId >= 0x80000000 is system catalog query we can ignore.
|
||||
static uint64_t getMaxMemPct(uint32_t sessionId);
|
||||
//...Delete sessionMemMap entry for the specified session's memory % use.
|
||||
//...SessionId >= 0x80000000 is system catalog query we can ignore.
|
||||
static void deleteMaxMemPct(uint32_t sessionId);
|
||||
//...Get and log query stats to specified output stream
|
||||
const std::string formatQueryStats(
|
||||
joblist::SJLP& jl, // joblist associated with query
|
||||
const std::string& label, // header label to print in front of log output
|
||||
bool includeNewLine, // include line breaks in query stats std::string
|
||||
bool vtableModeOn, bool wantExtendedStats, uint64_t rowsReturned);
|
||||
static void incThreadCntPerSession(uint32_t sessionId);
|
||||
static void decThreadCntPerSession(uint32_t sessionId);
|
||||
//...Init sessionMemMap entry for specified session to 0 memory %.
|
||||
//...SessionId >= 0x80000000 is system catalog query we can ignore.
|
||||
static void initMaxMemPct(uint32_t sessionId);
|
||||
//... Round off to human readable format (KB, MB, or GB).
|
||||
const std::string roundBytes(uint64_t value) const;
|
||||
void setRMParms(const execplan::CalpontSelectExecutionPlan::RMParmVec& parms);
|
||||
void buildSysCache(const execplan::CalpontSelectExecutionPlan& csep,
|
||||
boost::shared_ptr<execplan::CalpontSystemCatalog> csc);
|
||||
void writeCodeAndError(messageqcpp::ByteStream::quadbyte code, const std::string emsg);
|
||||
void analyzeTableExecute(messageqcpp::ByteStream& bs, joblist::SJLP& jl, bool& stmtCounted);
|
||||
void analyzeTableHandleStats(messageqcpp::ByteStream& bs);
|
||||
uint64_t roundMB(uint64_t value) const;
|
||||
public:
|
||||
void operator()();
|
||||
};
|
||||
}
|
||||
fStats.reset();
|
||||
fStats.setStartTime();
|
||||
fStats.fSessionID = sessionId;
|
||||
fStats.fQuery = sqlText;
|
||||
fStatsRetrieved = false;
|
||||
}
|
||||
//...Get % memory usage during latest query for sesssionId.
|
||||
//...SessionId >= 0x80000000 is system catalog query we can ignore.
|
||||
static uint64_t getMaxMemPct(uint32_t sessionId);
|
||||
//...Delete sessionMemMap entry for the specified session's memory % use.
|
||||
//...SessionId >= 0x80000000 is system catalog query we can ignore.
|
||||
static void deleteMaxMemPct(uint32_t sessionId);
|
||||
//...Get and log query stats to specified output stream
|
||||
const std::string formatQueryStats(
|
||||
joblist::SJLP& jl, // joblist associated with query
|
||||
const std::string& label, // header label to print in front of log output
|
||||
bool includeNewLine, // include line breaks in query stats std::string
|
||||
bool vtableModeOn, bool wantExtendedStats, uint64_t rowsReturned);
|
||||
static void incThreadCntPerSession(uint32_t sessionId);
|
||||
static void decThreadCntPerSession(uint32_t sessionId);
|
||||
//...Init sessionMemMap entry for specified session to 0 memory %.
|
||||
//...SessionId >= 0x80000000 is system catalog query we can ignore.
|
||||
static void initMaxMemPct(uint32_t sessionId);
|
||||
//... Round off to human readable format (KB, MB, or GB).
|
||||
const std::string roundBytes(uint64_t value) const;
|
||||
void setRMParms(const execplan::CalpontSelectExecutionPlan::RMParmVec& parms);
|
||||
void buildSysCache(const execplan::CalpontSelectExecutionPlan& csep,
|
||||
boost::shared_ptr<execplan::CalpontSystemCatalog> csc);
|
||||
void writeCodeAndError(messageqcpp::ByteStream::quadbyte code, const std::string emsg);
|
||||
void analyzeTableExecute(messageqcpp::ByteStream& bs, joblist::SJLP& jl, bool& stmtCounted);
|
||||
void analyzeTableHandleStats(messageqcpp::ByteStream& bs);
|
||||
uint64_t roundMB(uint64_t value) const;
|
||||
|
||||
public:
|
||||
void operator()();
|
||||
};
|
||||
} // namespace exemgr
|
||||
|
Reference in New Issue
Block a user