1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

chore(build): fixes to satisfy clang19 warnings

This commit is contained in:
Leonid Fedorov
2025-05-08 15:26:36 +00:00
committed by Leonid Fedorov
parent 9fd7f342a7
commit a0bee173f6
334 changed files with 3062 additions and 3323 deletions

View File

@ -158,7 +158,7 @@ class BatchPrimitiveProcessor
return touchedBlocks;
}
void setError(const std::string& error, logging::ErrorCodeValues errorCode)
void setError(const std::string& /*error*/, logging::ErrorCodeValues /*errorCode*/)
{
}
@ -203,7 +203,8 @@ class BatchPrimitiveProcessor
void serializeStrings(messageqcpp::SBS& bs);
void asyncLoadProjectColumns();
void writeErrorMsg(messageqcpp::SBS& bs, const std::string& error, uint16_t errCode, bool logIt = true, bool critical = true);
void writeErrorMsg(messageqcpp::SBS& bs, const std::string& error, uint16_t errCode, bool logIt = true,
bool critical = true);
BPSOutputType ot;
@ -308,14 +309,14 @@ class BatchPrimitiveProcessor
bool hasRowGroup;
/* Rowgroups + join */
using TJoiner = std::unordered_multimap<uint64_t, uint32_t, joiner::TupleJoiner::hasher,
std::equal_to<uint64_t>,
utils::STLPoolAllocator<std::pair<const uint64_t, uint32_t>>>;
using TLJoiner = std::unordered_multimap<
joiner::TypelessData, uint32_t, joiner::TupleJoiner::TypelessDataHasher,
joiner::TupleJoiner::TypelessDataComparator,
utils::STLPoolAllocator<std::pair<const joiner::TypelessData, uint32_t>>>;
using TJoiner =
std::unordered_multimap<uint64_t, uint32_t, joiner::TupleJoiner::hasher, std::equal_to<uint64_t>,
utils::STLPoolAllocator<std::pair<const uint64_t, uint32_t>>>;
using TLJoiner =
std::unordered_multimap<joiner::TypelessData, uint32_t, joiner::TupleJoiner::TypelessDataHasher,
joiner::TupleJoiner::TypelessDataComparator,
utils::STLPoolAllocator<std::pair<const joiner::TypelessData, uint32_t>>>;
bool generateJoinedRowGroup(rowgroup::Row& baseRow, const uint32_t depth = 0);
/* generateJoinedRowGroup helper fcns & vars */

View File

@ -39,7 +39,7 @@ void Command::createCommand(ByteStream& bs)
bs >> stepUuid;
}
void Command::resetCommand(ByteStream& bs){};
void Command::resetCommand(ByteStream& /*bs*/) {};
void Command::setMakeAbsRids(bool)
{

View File

@ -57,7 +57,7 @@ class Command
virtual void project(messageqcpp::SBS& bs) = 0;
virtual void projectIntoRowGroup(rowgroup::RowGroup& rg, uint32_t columnPosition) = 0;
virtual uint64_t getLBID() = 0;
virtual void getLBIDList(uint32_t loopCount, std::vector<int64_t>* out)
virtual void getLBIDList(uint32_t /*loopCount*/, std::vector<int64_t>* /*out*/)
{
} // the default fcn returns 0 lbids
virtual void nextLBID() = 0;

View File

@ -104,11 +104,11 @@ void DictStep::createCommand(ByteStream& bs)
Command::createCommand(bs);
}
void DictStep::resetCommand(ByteStream& bs)
void DictStep::resetCommand(ByteStream& /*bs*/)
{
}
void DictStep::prep(int8_t outputType, bool makeAbsRids)
void DictStep::prep(int8_t /*outputType*/, bool /*makeAbsRids*/)
{
// (at most there are 8192 tokens to fetch)
bufferSize = sizeof(DictInput) + filterString.length() + (8192 * sizeof(OldGetSigParams));
@ -188,14 +188,15 @@ void DictStep::copyResultToTmpSpace(OrderedToken* ot)
pos += 1;
len = *((uint16_t*)pos);
pos += 2;
if (!isnull) {
if (!isnull)
{
ns.assign(pos, len);
}
pos += len;
ot[rid16].str = ns;
//if (rid64 & 0x8000000000000000LL)
// ot[rid16].str = joblist::CPNULLSTRMARK;
// if (rid64 & 0x8000000000000000LL)
// ot[rid16].str = joblist::CPNULLSTRMARK;
}
}
}

View File

@ -193,19 +193,19 @@ void FilterCommand::createCommand(ByteStream& bs)
Command::createCommand(bs);
}
void FilterCommand::resetCommand(ByteStream& bs)
void FilterCommand::resetCommand(ByteStream& /*bs*/)
{
}
void FilterCommand::prep(int8_t outputType, bool absRids)
void FilterCommand::prep(int8_t /*outputType*/, bool /*absRids*/)
{
}
void FilterCommand::project(messageqcpp::SBS& bs)
void FilterCommand::project(messageqcpp::SBS& /*bs*/)
{
}
void FilterCommand::projectIntoRowGroup(rowgroup::RowGroup& rg, uint32_t col)
void FilterCommand::projectIntoRowGroup(rowgroup::RowGroup& /*rg*/, uint32_t /*col*/)
{
}

View File

@ -46,7 +46,7 @@ PassThruCommand::~PassThruCommand()
{
}
void PassThruCommand::prep(int8_t outputType, bool makeAbsRids)
void PassThruCommand::prep(int8_t /*outputType*/, bool /*makeAbsRids*/)
{
if (bpp->ot == ROW_GROUP)
{
@ -173,7 +173,7 @@ void PassThruCommand::createCommand(ByteStream& bs)
Command::createCommand(bs);
}
void PassThruCommand::resetCommand(ByteStream& bs)
void PassThruCommand::resetCommand(ByteStream& /*bs*/)
{
}

View File

@ -154,7 +154,7 @@ struct preFetchCond
boost::condition cond;
unsigned waiters;
preFetchCond(const uint64_t l)
preFetchCond(const uint64_t)
{
waiters = 0;
}
@ -825,7 +825,7 @@ void loadBlock(uint64_t lbid, QueryContext v, uint32_t t, int compType, void* bu
struct AsynchLoader
{
AsynchLoader(uint64_t l, QueryContext v, uint32_t t, int ct, uint32_t* cCount, uint32_t* rCount, bool trace,
uint32_t sesID, boost::mutex* m, uint32_t* loaderCount,
uint32_t /*sesID*/, boost::mutex* m, uint32_t* loaderCount,
boost::shared_ptr<BPPSendThread> st, // sendThread for abort upon exception.
VSSCache* vCache)
: lbid(l)
@ -833,7 +833,6 @@ struct AsynchLoader
, txn(t)
, compType(ct)
, LBIDTrace(trace)
, sessionID(sesID)
, cacheCount(cCount)
, readCount(rCount)
, busyLoaders(loaderCount)
@ -905,7 +904,6 @@ struct AsynchLoader
uint32_t txn;
int compType;
bool LBIDTrace;
uint32_t sessionID;
uint32_t* cacheCount;
uint32_t* readCount;
uint32_t* busyLoaders;
@ -1596,8 +1594,8 @@ struct BPPHandler
{
if (posix_time::second_clock::universal_time() > dieTime)
{
cout << "destroyBPP: job for id " << uniqueID << " and sessionID " << sessionID << " has been killed."
<< endl;
cout << "destroyBPP: job for id " << uniqueID << " and sessionID " << sessionID
<< " has been killed." << endl;
// If for some reason there are jobs for this uniqueID that arrived later
// they won't leave PP thread pool staying there forever.
}
@ -1617,7 +1615,7 @@ struct BPPHandler
if (bppv)
{
bppv->abort();
}
}
return 0;
}
@ -1841,7 +1839,7 @@ struct ReadThread
ios->write(buildCacheOpResp(0));
}
void doCacheFlushCmd(SP_UM_IOSOCK ios, const ByteStream& bs)
void doCacheFlushCmd(SP_UM_IOSOCK ios, const ByteStream& /*bs*/)
{
for (int i = 0; i < fCacheCount; i++)
{
@ -2251,19 +2249,17 @@ struct ServerThread
namespace primitiveprocessor
{
PrimitiveServer::PrimitiveServer(int serverThreads, int serverQueueSize, int processorWeight,
int processorQueueSize, bool rotatingDestination, uint32_t BRPBlocks,
int /*processorQueueSize*/, bool rotatingDestination, uint32_t BRPBlocks,
int BRPThreads, int cacheCount, int maxBlocksPerRead, int readAheadBlocks,
uint32_t deleteBlocks, bool ptTrace, double prefetch, uint64_t smallSide)
uint32_t deleteBlocks, bool ptTrace, double prefetch, uint64_t /*smallSide*/)
: fServerThreads(serverThreads)
, fServerQueueSize(serverQueueSize)
, fProcessorWeight(processorWeight)
, fProcessorQueueSize(processorQueueSize)
, fMaxBlocksPerRead(maxBlocksPerRead)
, fReadAheadBlocks(readAheadBlocks)
, fRotatingDestination(rotatingDestination)
, fPTTrace(ptTrace)
, fPrefetchThreshold(prefetch)
, fPMSmallSide(smallSide)
{
fCacheCount = cacheCount;
fServerpool.setMaxThreads(fServerThreads);

View File

@ -171,13 +171,11 @@ class PrimitiveServer
int fServerThreads;
int fServerQueueSize;
int fProcessorWeight;
int fProcessorQueueSize;
int fMaxBlocksPerRead;
int fReadAheadBlocks;
bool fRotatingDestination;
bool fPTTrace;
double fPrefetchThreshold;
uint64_t fPMSmallSide;
};
} // namespace primitiveprocessor

View File

@ -39,7 +39,7 @@
#include <thread>
#include <mutex>
#include <condition_variable>
//#define NDEBUG
// #define NDEBUG
#include <cassert>
using namespace std;
@ -123,10 +123,9 @@ void setupSignalHandlers()
sigaddset(&sigset, SIGPIPE);
sigaddset(&sigset, SIGUSR2);
sigprocmask(SIG_BLOCK, &sigset, 0);
}
int8_t setupCwd(Config* cf)
int8_t setupCwd(Config* /*cf*/)
{
string workdir = startup::StartUp::tmpDir();
@ -649,7 +648,6 @@ int ServicePrimProc::Child()
if ((strVal == "n") || (strVal == "N"))
directIOFlag = 0;
IDBPolicy::configIDBPolicy();
// no versionbuffer if using HDFS for performance reason

View File

@ -163,7 +163,7 @@ void RTSCommand::nextLBID()
col->nextLBID();
}
void RTSCommand::prep(int8_t outputType, bool makeAbsRids)
void RTSCommand::prep(int8_t /*outputType*/, bool /*makeAbsRids*/)
{
if (!passThru)
col->prep(OT_BOTH, true);

View File

@ -93,7 +93,7 @@ void added_a_pm(int)
std::cout << "Total UM memory available: " << num << std::endl;
}
void printTotalUmMemory(int sig)
void printTotalUmMemory(int /*sig*/)
{
int64_t num = globServiceExeMgr->getRm().availableMemory();
std::cout << "Total UM memory available: " << num << std::endl;

View File

@ -94,7 +94,7 @@ class Opt
}
};
void printTotalUmMemory(int sig);
void printTotalUmMemory(int sig);
class ServiceExeMgr : public Service, public Opt
{
@ -102,7 +102,7 @@ class ServiceExeMgr : public Service, public Opt
using ThreadCntPerSessionMap_t = std::map<uint32_t, uint32_t>;
protected:
void log(logging::LOG_TYPE type, const std::string& str)
void log(logging::LOG_TYPE type, const std::string& /*str*/)
{
logging::LoggingID logid(16);
logging::Message::Args args;
@ -113,40 +113,43 @@ class ServiceExeMgr : public Service, public Opt
logger.logMessage(type, message, logid);
}
public:
ServiceExeMgr(const Opt& opt, joblist::ResourceManager* rm) : Service("ExeMgr"), Opt(opt), msgLog_(logging::Logger(16)), rm_(rm)
{ }
void LogErrno() override
{
log(logging::LOG_TYPE_CRITICAL, std::string(strerror(errno)));
}
void ParentLogChildMessage(const std::string& str) override
{
log(logging::LOG_TYPE_INFO, str);
}
int Child() override;
int Run()
{
return m_fg ? Child() : RunForking();
}
static const constexpr unsigned logDefaultMsg = logging::M0000;
static const constexpr unsigned logDbProfStartStatement = logging::M0028;
static const constexpr unsigned logDbProfEndStatement = logging::M0029;
static const constexpr unsigned logStartSql = logging::M0041;
static const constexpr unsigned logEndSql = logging::M0042;
static const constexpr unsigned logRssTooBig = logging::M0044;
static const constexpr unsigned logDbProfQueryStats = logging::M0047;
static const constexpr unsigned logExeMgrExcpt = logging::M0055;
// If any flags other than the table mode flags are set, produce output to screeen
static const constexpr uint32_t flagsWantOutput = (0xffffffff & ~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_AUTOSWITCH &
~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_OFF);
logging::Logger& getLogger()
{
return msgLog_;
}
void updateSessionMap(const size_t pct)
{
std::lock_guard<std::mutex> lk(sessionMemMapMutex_);
public:
ServiceExeMgr(const Opt& opt, joblist::ResourceManager* rm)
: Service("ExeMgr"), Opt(opt), msgLog_(logging::Logger(16)), rm_(rm)
{
}
void LogErrno() override
{
log(logging::LOG_TYPE_CRITICAL, std::string(strerror(errno)));
}
void ParentLogChildMessage(const std::string& str) override
{
log(logging::LOG_TYPE_INFO, str);
}
int Child() override;
int Run()
{
return m_fg ? Child() : RunForking();
}
static const constexpr unsigned logDefaultMsg = logging::M0000;
static const constexpr unsigned logDbProfStartStatement = logging::M0028;
static const constexpr unsigned logDbProfEndStatement = logging::M0029;
static const constexpr unsigned logStartSql = logging::M0041;
static const constexpr unsigned logEndSql = logging::M0042;
static const constexpr unsigned logRssTooBig = logging::M0044;
static const constexpr unsigned logDbProfQueryStats = logging::M0047;
static const constexpr unsigned logExeMgrExcpt = logging::M0055;
// If any flags other than the table mode flags are set, produce output to screeen
static const constexpr uint32_t flagsWantOutput =
(0xffffffff & ~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_AUTOSWITCH &
~execplan::CalpontSelectExecutionPlan::TRACE_TUPLE_OFF);
logging::Logger& getLogger()
{
return msgLog_;
}
void updateSessionMap(const size_t pct)
{
std::lock_guard<std::mutex> lk(sessionMemMapMutex_);
for (auto mapIter = sessionMemMap_.begin(); mapIter != sessionMemMap_.end(); ++mapIter)
{