You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4030: first commit of warning removals unneed const and missing virtual dtors.
This commit is contained in:
@ -281,14 +281,14 @@ public:
|
||||
|
||||
/** @brief Is it required to debug
|
||||
*/
|
||||
const bool isDebug( const DebugLevel level ) const
|
||||
bool isDebug( const DebugLevel level ) const
|
||||
{
|
||||
return level <= fDebugLevel;
|
||||
}
|
||||
|
||||
/** @brief Get debug level
|
||||
*/
|
||||
const DebugLevel getDebugLevel() const
|
||||
DebugLevel getDebugLevel() const
|
||||
{
|
||||
return fDebugLevel;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public:
|
||||
|
||||
/** @brief get the logging flag
|
||||
*/
|
||||
const bool get_Logging() const
|
||||
bool get_Logging() const
|
||||
{
|
||||
return fLogging;
|
||||
}
|
||||
@ -153,7 +153,7 @@ public:
|
||||
|
||||
/** @brief get the logending flag
|
||||
*/
|
||||
const bool get_Logending() const
|
||||
bool get_Logending() const
|
||||
{
|
||||
return fLogending;
|
||||
}
|
||||
@ -169,7 +169,7 @@ public:
|
||||
|
||||
/** @brief get the isFromCol flag
|
||||
*/
|
||||
const bool get_IsFromCol() const
|
||||
bool get_IsFromCol() const
|
||||
{
|
||||
return fIsFromCol;
|
||||
}
|
||||
|
@ -90,19 +90,19 @@ public:
|
||||
|
||||
/** @brief get the data for the column
|
||||
*/
|
||||
const bool get_isnull() const
|
||||
bool get_isnull() const
|
||||
{
|
||||
return fisNULL;
|
||||
}
|
||||
/** @brief get the fIsFromCol data for the column
|
||||
*/
|
||||
const bool get_isFromCol() const
|
||||
bool get_isFromCol() const
|
||||
{
|
||||
return fIsFromCol;
|
||||
}
|
||||
/** @brief get the fFuncScale data for the column
|
||||
*/
|
||||
const uint32_t get_funcScale() const
|
||||
uint32_t get_funcScale() const
|
||||
{
|
||||
return fFuncScale;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ public:
|
||||
}
|
||||
/** @brief get the logging flag
|
||||
*/
|
||||
inline const bool get_Logging() const
|
||||
inline bool get_Logging() const
|
||||
{
|
||||
return fLogging;
|
||||
}
|
||||
@ -213,7 +213,7 @@ public:
|
||||
|
||||
/** @brief get the logging flag
|
||||
*/
|
||||
inline const bool get_Logending() const
|
||||
inline bool get_Logending() const
|
||||
{
|
||||
return fLogending;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
|
||||
/** @brief Is it required to debug
|
||||
*/
|
||||
inline const bool isDebug( const DebugLevel level ) const
|
||||
inline bool isDebug( const DebugLevel level ) const
|
||||
{
|
||||
return level <= fDebugLevel;
|
||||
}
|
||||
@ -202,7 +202,7 @@ public:
|
||||
/**
|
||||
* @brief Get debug level
|
||||
*/
|
||||
inline const DebugLevel getDebugLevel() const
|
||||
inline DebugLevel getDebugLevel() const
|
||||
{
|
||||
return fDebugLevel;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public:
|
||||
/**
|
||||
* accessor
|
||||
*/
|
||||
virtual const uint8_t aggOp() const
|
||||
virtual uint8_t aggOp() const
|
||||
{
|
||||
return fAggOp;
|
||||
}
|
||||
@ -192,7 +192,7 @@ public:
|
||||
/**
|
||||
* ASC flag
|
||||
*/
|
||||
inline virtual const bool asc() const
|
||||
inline virtual bool asc() const
|
||||
{
|
||||
return fAsc;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
/**
|
||||
* get asc flag
|
||||
*/
|
||||
inline const bool asc() const
|
||||
inline bool asc() const
|
||||
{
|
||||
return fAsc;
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ public:
|
||||
{
|
||||
fDistinctUnionNum = distinctUnionNum;
|
||||
}
|
||||
const uint8_t distinctUnionNum() const
|
||||
uint8_t distinctUnionNum() const
|
||||
{
|
||||
return fDistinctUnionNum;
|
||||
}
|
||||
@ -574,7 +574,7 @@ public:
|
||||
{
|
||||
fHasOrderBy = hasOrderBy;
|
||||
}
|
||||
const bool hasOrderBy() const
|
||||
bool hasOrderBy() const
|
||||
{
|
||||
return fHasOrderBy;
|
||||
}
|
||||
@ -583,7 +583,7 @@ public:
|
||||
{
|
||||
fSpecHandlerProcessed = hand;
|
||||
}
|
||||
const bool specHandlerProcessed() const
|
||||
bool specHandlerProcessed() const
|
||||
{
|
||||
return fSpecHandlerProcessed;
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ CalpontSystemCatalog::CatalogMap CalpontSystemCatalog::fCatalogMap;
|
||||
/*static*/
|
||||
uint32_t CalpontSystemCatalog::fModuleID = numeric_limits<uint32_t>::max();
|
||||
|
||||
const CalpontSystemCatalog::OID CalpontSystemCatalog::lookupTableOID(const TableName& tablename)
|
||||
CalpontSystemCatalog::OID CalpontSystemCatalog::lookupTableOID(const TableName& tablename)
|
||||
{
|
||||
TableName aTableName;
|
||||
aTableName.schema = tablename.schema;
|
||||
@ -511,7 +511,7 @@ const CalpontSystemCatalog::OID CalpontSystemCatalog::lookupTableOID(const Table
|
||||
return (OID)0;
|
||||
}
|
||||
|
||||
const CalpontSystemCatalog::OID CalpontSystemCatalog::lookupOID(const TableColName& tableColName)
|
||||
CalpontSystemCatalog::OID CalpontSystemCatalog::lookupOID(const TableColName& tableColName)
|
||||
{
|
||||
if (tableColName.schema.length() == 0 || tableColName.table.length() == 0 || tableColName.column.length() == 0)
|
||||
return -1;
|
||||
@ -1583,7 +1583,7 @@ const CalpontSystemCatalog::TableColName CalpontSystemCatalog::dictColName(const
|
||||
|
||||
return tableColName;
|
||||
}
|
||||
const uint64_t CalpontSystemCatalog::nextAutoIncrValue ( TableName aTableName)
|
||||
uint64_t CalpontSystemCatalog::nextAutoIncrValue ( TableName aTableName)
|
||||
{
|
||||
transform( aTableName.schema.begin(), aTableName.schema.end(), aTableName.schema.begin(), to_lower() );
|
||||
transform( aTableName.table.begin(), aTableName.table.end(), aTableName.table.begin(), to_lower() );
|
||||
@ -2897,7 +2897,7 @@ const vector< pair<CalpontSystemCatalog::OID, CalpontSystemCatalog::TableName> >
|
||||
}
|
||||
|
||||
/* SQL statement: select objectid from systable */
|
||||
const int CalpontSystemCatalog::getTableCount ()
|
||||
int CalpontSystemCatalog::getTableCount ()
|
||||
{
|
||||
int tableCnt = 0;
|
||||
|
||||
@ -4020,7 +4020,7 @@ const CalpontSystemCatalog::ROPair CalpontSystemCatalog::indexRID(const IndexNam
|
||||
}
|
||||
#endif
|
||||
|
||||
const int CalpontSystemCatalog::colNumbers(const TableName& tableName)
|
||||
int CalpontSystemCatalog::colNumbers(const TableName& tableName)
|
||||
{
|
||||
DEBUG << "Enter colNumbers: " << tableName.schema << "|" << tableName.table << endl;
|
||||
|
||||
@ -4891,7 +4891,7 @@ void CalpontSystemCatalog::updateColInfo(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
const int CalpontSystemCatalog::colPosition (const OID& oid)
|
||||
int CalpontSystemCatalog::colPosition (const OID& oid)
|
||||
{
|
||||
DEBUG << "Enter colPosition: " << oid << endl;
|
||||
ColType col = colType (oid);
|
||||
|
@ -550,13 +550,13 @@ public:
|
||||
*
|
||||
* For a unique table_name return the internal OID
|
||||
*/
|
||||
const OID lookupTableOID(const TableName& tableName);
|
||||
OID lookupTableOID(const TableName& tableName);
|
||||
|
||||
/** looks up a column's OID in the System Catalog
|
||||
*
|
||||
* For a unique table_name.column_name return the internal OID
|
||||
*/
|
||||
const OID lookupOID(const TableColName& tableColName);
|
||||
OID lookupOID(const TableColName& tableColName);
|
||||
|
||||
/** returns the column type attribute(s) for a column
|
||||
*
|
||||
@ -588,7 +588,7 @@ public:
|
||||
* 0: Autoincrement does not exist for this table
|
||||
* Throws runtime_error if no such table found
|
||||
*/
|
||||
const uint64_t nextAutoIncrValue ( TableName tableName);
|
||||
uint64_t nextAutoIncrValue ( TableName tableName);
|
||||
|
||||
/** returns the rid of next autoincrement value for the table oid
|
||||
*
|
||||
@ -606,13 +606,13 @@ public:
|
||||
*
|
||||
* return the bitmap file object number for a given OID:
|
||||
*/
|
||||
const OID colBitmap(const OID& oid) const;
|
||||
OID colBitmap(const OID& oid) const;
|
||||
|
||||
/** return the current SCN
|
||||
*
|
||||
* returns the current System Change Number (for versioning support)
|
||||
*/
|
||||
const SCN scn(void) const;
|
||||
SCN scn(void) const;
|
||||
|
||||
/** return the RID's of the indexes for a table
|
||||
*
|
||||
@ -624,7 +624,7 @@ public:
|
||||
*
|
||||
* returns the total number of columns for a table
|
||||
*/
|
||||
const int colNumbers(const TableName& tableName);
|
||||
int colNumbers(const TableName& tableName);
|
||||
|
||||
/** return the RID's of the colindexes for a table
|
||||
*
|
||||
@ -648,7 +648,7 @@ public:
|
||||
*
|
||||
* returns a RID of the constraint for a ConstrainName fron table SYSCONSTRAINT
|
||||
*/
|
||||
const RID constraintRID(const std::string constraintName);
|
||||
RID constraintRID(const std::string constraintName);
|
||||
|
||||
/** return the list of IndexName for a given TableColName
|
||||
*
|
||||
@ -666,7 +666,7 @@ public:
|
||||
*
|
||||
* returns the RID of the colconstraints for a column
|
||||
*/
|
||||
const RID constraintColRID(const TableColName& tableColName);
|
||||
RID constraintColRID(const TableColName& tableColName);
|
||||
|
||||
/** return the value for the given RID and column name from table SYSCONSTRAINTCOL
|
||||
*
|
||||
@ -812,7 +812,7 @@ public:
|
||||
/** sessionid access and mutator methods
|
||||
*
|
||||
*/
|
||||
const uint32_t sessionID() const
|
||||
uint32_t sessionID() const
|
||||
{
|
||||
return fSessionID;
|
||||
}
|
||||
@ -823,7 +823,7 @@ public:
|
||||
/** identity access and mutator methods
|
||||
*
|
||||
*/
|
||||
const int identity() const
|
||||
int identity() const
|
||||
{
|
||||
return fIdentity;
|
||||
}
|
||||
@ -836,7 +836,7 @@ public:
|
||||
*
|
||||
* return the column position for a given OID
|
||||
*/
|
||||
const int colPosition (const OID& oid);
|
||||
int colPosition (const OID& oid);
|
||||
/** return primary key name for the given table */
|
||||
const std::string primaryKeyName (const TableName& tableName );
|
||||
/** return the table info
|
||||
@ -849,7 +849,7 @@ public:
|
||||
/** return the list of tables for a given schema */
|
||||
const std::vector< std::pair<OID, TableName> > getTables (const std::string schema = "");
|
||||
/** return the number of tables in the whole database */
|
||||
const int getTableCount ();
|
||||
int getTableCount ();
|
||||
/** return the constraint info for a given constraint */
|
||||
const ConstraintInfo constraintInfo (const IndexName& constraintName);
|
||||
/** return the constraintName list for a given referencePKName */
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
fSub = sub;
|
||||
}
|
||||
|
||||
const bool notExists() const
|
||||
bool notExists() const
|
||||
{
|
||||
return fNotExists;
|
||||
}
|
||||
@ -75,7 +75,7 @@ public:
|
||||
fNotExists = notExists;
|
||||
}
|
||||
|
||||
const bool correlated() const
|
||||
bool correlated() const
|
||||
{
|
||||
return fCorrelated;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
{
|
||||
fVal = val;
|
||||
}
|
||||
const int intervalType() const
|
||||
int intervalType() const
|
||||
{
|
||||
return fIntervalType;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
/**
|
||||
* Accessor and mutator
|
||||
*/
|
||||
const uint32_t pseudoType() const
|
||||
uint32_t pseudoType() const
|
||||
{
|
||||
return fPseudoType;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
fData = data;
|
||||
}
|
||||
|
||||
virtual const bool returnAll() const
|
||||
virtual bool returnAll() const
|
||||
{
|
||||
return fReturnAll;
|
||||
}
|
||||
@ -114,7 +114,7 @@ public:
|
||||
fReturnAll = returnAll;
|
||||
}
|
||||
|
||||
const uint32_t sessionID() const
|
||||
uint32_t sessionID() const
|
||||
{
|
||||
return fSessionID;
|
||||
}
|
||||
@ -123,7 +123,7 @@ public:
|
||||
fSessionID = sessionID;
|
||||
}
|
||||
|
||||
inline const int32_t sequence() const
|
||||
inline int32_t sequence() const
|
||||
{
|
||||
return fSequence;
|
||||
}
|
||||
@ -159,7 +159,7 @@ public:
|
||||
fDistinct = distinct;
|
||||
}
|
||||
|
||||
const uint32_t expressionId() const
|
||||
uint32_t expressionId() const
|
||||
{
|
||||
return fExpressionId;
|
||||
}
|
||||
@ -177,7 +177,7 @@ public:
|
||||
fJoinInfo = joinInfo;
|
||||
}
|
||||
|
||||
virtual const bool asc() const
|
||||
virtual bool asc() const
|
||||
{
|
||||
return fAsc;
|
||||
}
|
||||
@ -186,7 +186,7 @@ public:
|
||||
fAsc = asc;
|
||||
}
|
||||
|
||||
virtual const bool nullsFirst() const
|
||||
virtual bool nullsFirst() const
|
||||
{
|
||||
return fNullsFirst;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
fSub = sub;
|
||||
}
|
||||
|
||||
const bool correlated() const
|
||||
bool correlated() const
|
||||
{
|
||||
return fCorrelated;
|
||||
}
|
||||
@ -120,7 +120,7 @@ public:
|
||||
fData = data;
|
||||
}
|
||||
|
||||
const uint64_t returnedColPos() const
|
||||
uint64_t returnedColPos() const
|
||||
{
|
||||
return fReturnedColPos;
|
||||
}
|
||||
|
@ -143,12 +143,12 @@ void SessionManager::reset()
|
||||
dbrm.sessionmanager_reset();
|
||||
}
|
||||
|
||||
const uint32_t SessionManager::getUnique32()
|
||||
uint32_t SessionManager::getUnique32()
|
||||
{
|
||||
return dbrm.getUnique32();
|
||||
}
|
||||
|
||||
const bool SessionManager::checkActiveTransaction( const SID sessionId, bool& bIsDbrmUp, SIDTIDEntry& blocker )
|
||||
bool SessionManager::checkActiveTransaction( const SID sessionId, bool& bIsDbrmUp, SIDTIDEntry& blocker )
|
||||
{
|
||||
bIsDbrmUp = true;
|
||||
int arrayLenth = 0;
|
||||
@ -176,7 +176,7 @@ const bool SessionManager::checkActiveTransaction( const SID sessionId, bool& bI
|
||||
return ret;
|
||||
}
|
||||
|
||||
const bool SessionManager::isTransactionActive(const SID sessionId, bool& bIsDbrmUp)
|
||||
bool SessionManager::isTransactionActive(const SID sessionId, bool& bIsDbrmUp)
|
||||
{
|
||||
bIsDbrmUp = true;
|
||||
int arrayLenth = 0;
|
||||
|
@ -186,7 +186,7 @@ public:
|
||||
* object on the PM.
|
||||
* @return A "unique" uint32_t.
|
||||
*/
|
||||
const uint32_t getUnique32();
|
||||
uint32_t getUnique32();
|
||||
|
||||
/** @brief Returns the number of active transactions. Only useful in testing.
|
||||
*
|
||||
@ -206,8 +206,8 @@ public:
|
||||
|
||||
std::string getTxnIDFilename() const;
|
||||
|
||||
const bool checkActiveTransaction(const SID sessionId, bool& bIsDbrmUp, BRM::SIDTIDEntry& blocker);
|
||||
const bool isTransactionActive(const SID sessionId, bool& bIsDbrmUp);
|
||||
bool checkActiveTransaction(const SID sessionId, bool& bIsDbrmUp, BRM::SIDTIDEntry& blocker);
|
||||
bool isTransactionActive(const SID sessionId, bool& bIsDbrmUp);
|
||||
|
||||
private:
|
||||
BRM::DBRM dbrm;
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
{
|
||||
fTimeZone = timeZone;
|
||||
}
|
||||
inline const bool isColumnStore() const
|
||||
inline bool isColumnStore() const
|
||||
{
|
||||
return fisColumnStore;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ public:
|
||||
{
|
||||
fIndexFlag = indexFlag;
|
||||
}
|
||||
const int indexFlag() const
|
||||
int indexFlag() const
|
||||
{
|
||||
return fIndexFlag;
|
||||
}
|
||||
@ -201,7 +201,7 @@ public:
|
||||
{
|
||||
fJoinFlag = joinFlag;
|
||||
}
|
||||
const int joinFlag() const
|
||||
int joinFlag() const
|
||||
{
|
||||
return fJoinFlag;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
return COLUMN_COMMAND;
|
||||
}
|
||||
// @bug 1098
|
||||
const uint8_t getBOP() const
|
||||
uint8_t getBOP() const
|
||||
{
|
||||
return BOP;
|
||||
}
|
||||
@ -64,7 +64,7 @@ public:
|
||||
{
|
||||
return filterString;
|
||||
}
|
||||
const uint16_t getFilterCount() const
|
||||
uint16_t getFilterCount() const
|
||||
{
|
||||
return filterCount;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
void createCommand(messageqcpp::ByteStream& bs) const;
|
||||
void runCommand(messageqcpp::ByteStream& bs) const;
|
||||
uint16_t getWidth();
|
||||
const uint8_t getBOP() const
|
||||
uint8_t getBOP() const
|
||||
{
|
||||
return fBOP;
|
||||
};
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
errInfo = sp;
|
||||
}
|
||||
|
||||
virtual const uint32_t status() const
|
||||
virtual uint32_t status() const
|
||||
{
|
||||
return errInfo->errCode;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
return largeRG;
|
||||
}
|
||||
const uint32_t getSmallKey() const
|
||||
uint32_t getSmallKey() const
|
||||
{
|
||||
return smallSideKeys[0][0];
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ const string format(int64_t v, CalpontSystemCatalog::ColType& ct)
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
const int64_t IDB_format(char* str, CalpontSystemCatalog::ColType& ct, uint8_t& rf)
|
||||
int64_t IDB_format(char* str, CalpontSystemCatalog::ColType& ct, uint8_t& rf)
|
||||
{
|
||||
int64_t v = 0;
|
||||
bool pushWarning = false;
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
{
|
||||
return fGwip;
|
||||
}
|
||||
const bool correlated() const
|
||||
bool correlated() const
|
||||
{
|
||||
return fCorrelated;
|
||||
}
|
||||
@ -126,7 +126,7 @@ public:
|
||||
execplan::ParseTree* transform_between();
|
||||
execplan::ParseTree* transform_in();
|
||||
execplan::ParseTree* buildParseTree(execplan::PredicateOperator* op);
|
||||
const uint64_t returnedColPos() const
|
||||
uint64_t returnedColPos() const
|
||||
{
|
||||
return fReturnedColPos;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
/*
|
||||
* @brief access methods
|
||||
*/
|
||||
inline const uint16_t getAlarmID() const
|
||||
inline uint16_t getAlarmID() const
|
||||
{
|
||||
return alarmID;
|
||||
}
|
||||
@ -76,25 +76,25 @@ public:
|
||||
}
|
||||
void setComponentID (const std::string&);
|
||||
|
||||
inline const uint16_t getSeverity() const
|
||||
inline uint16_t getSeverity() const
|
||||
{
|
||||
return severity;
|
||||
}
|
||||
void setSeverity (const uint16_t);
|
||||
|
||||
inline const bool getState () const
|
||||
inline bool getState () const
|
||||
{
|
||||
return state;
|
||||
}
|
||||
void setState (const bool);
|
||||
|
||||
inline const uint16_t getCtnThreshold() const
|
||||
inline uint16_t getCtnThreshold() const
|
||||
{
|
||||
return ctnThreshold;
|
||||
}
|
||||
void setCtnThreshold (const uint16_t);
|
||||
|
||||
inline const uint16_t getOccurrence() const
|
||||
inline uint16_t getOccurrence() const
|
||||
{
|
||||
return occurrence;
|
||||
}
|
||||
@ -106,19 +106,19 @@ public:
|
||||
}
|
||||
void setReceiveTime (const time_t);
|
||||
|
||||
inline const uint32_t getLastIssueTime() const
|
||||
inline uint32_t getLastIssueTime() const
|
||||
{
|
||||
return lastIssueTime;
|
||||
}
|
||||
void setLastIssueTime (const uint32_t);
|
||||
|
||||
inline const uint16_t getPid () const
|
||||
inline uint16_t getPid () const
|
||||
{
|
||||
return pid;
|
||||
}
|
||||
void setPid (const uint16_t);
|
||||
|
||||
inline const uint16_t getTid () const
|
||||
inline uint16_t getTid () const
|
||||
{
|
||||
return tid;
|
||||
}
|
||||
@ -130,7 +130,7 @@ public:
|
||||
}
|
||||
void setTimestamp (const std::string&);
|
||||
|
||||
inline const time_t getTimestampSeconds () const
|
||||
inline time_t getTimestampSeconds () const
|
||||
{
|
||||
return timestampseconds;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
/**
|
||||
* @brief retrieve the Disk Block at lbid, ver from the Disk Block Buffer Cache
|
||||
**/
|
||||
inline const int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, FileBuffer& fb)
|
||||
inline int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, FileBuffer& fb)
|
||||
{
|
||||
return fBCCBrp->read(lbid, ver, fb);
|
||||
}
|
||||
@ -88,12 +88,12 @@ public:
|
||||
/**
|
||||
* @brief retrieve the Disk Block at lbid, ver from the Disk Block Buffer Cache
|
||||
**/
|
||||
inline const int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, void* bufferPtr)
|
||||
inline int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, void* bufferPtr)
|
||||
{
|
||||
return fBCCBrp->read(lbid, ver, bufferPtr);
|
||||
}
|
||||
|
||||
inline const int getBlock(const BRM::LBID_t& lbid, const BRM::QueryContext& ver, const BRM::VER_t txn, const int compType,
|
||||
inline int getBlock(const BRM::LBID_t& lbid, const BRM::QueryContext& ver, const BRM::VER_t txn, const int compType,
|
||||
void* bufferPtr, bool flg, bool& wasCached, bool* wasVersioned = NULL, bool insertIntoCache = true,
|
||||
bool readFromCache = true)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ int BlockRequestProcessor::check(BRM::LBID_t lbid, const BRM::QueryContext& ver,
|
||||
}
|
||||
}
|
||||
|
||||
const int BlockRequestProcessor::getBlock(const BRM::LBID_t& lbid, const BRM::QueryContext& ver, BRM::VER_t txn,
|
||||
int BlockRequestProcessor::getBlock(const BRM::LBID_t& lbid, const BRM::QueryContext& ver, BRM::VER_t txn,
|
||||
int compType, void* bufferPtr, bool vbFlg, bool& wasCached, bool* versioned, bool insertIntoCache,
|
||||
bool readFromCache)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
return fbMgr.findPtr(HashObject_t(lbid, ver, flg));
|
||||
}
|
||||
|
||||
inline const int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, FileBuffer& fb)
|
||||
inline int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, FileBuffer& fb)
|
||||
{
|
||||
return (fbMgr.find(HashObject_t(lbid, ver, 0), fb) ? 1 : 0);
|
||||
}
|
||||
@ -98,12 +98,12 @@ public:
|
||||
/**
|
||||
* @brief retrieve the lbid@ver disk block from the block cache
|
||||
**/
|
||||
inline const int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, void* bufferPtr)
|
||||
inline int read(const BRM::LBID_t& lbid, const BRM::VER_t& ver, void* bufferPtr)
|
||||
{
|
||||
return (fbMgr.find(HashObject_t(lbid, ver, 0), bufferPtr) ? 1 : 0);
|
||||
}
|
||||
|
||||
const int getBlock(const BRM::LBID_t& lbid, const BRM::QueryContext& ver, BRM::VER_t txn, int compType,
|
||||
int getBlock(const BRM::LBID_t& lbid, const BRM::QueryContext& ver, BRM::VER_t txn, int compType,
|
||||
void* bufferPtr, bool flg, bool& wasCached, bool* wasVersioned, bool insertIntoCache,
|
||||
bool readFromCache);
|
||||
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
return fByteData;
|
||||
}
|
||||
|
||||
inline const uint32_t datLen() const
|
||||
inline uint32_t datLen() const
|
||||
{
|
||||
return fDataLen;
|
||||
}
|
||||
@ -136,7 +136,7 @@ public:
|
||||
/**
|
||||
* @brief return the lbid value of disk bloc
|
||||
**/
|
||||
inline const BRM::LBID_t Lbid() const
|
||||
inline BRM::LBID_t Lbid() const
|
||||
{
|
||||
return fLbid;
|
||||
}
|
||||
@ -148,7 +148,7 @@ public:
|
||||
/**
|
||||
* @brief return the version of this disk block. ignored for range retrievals
|
||||
**/
|
||||
inline const BRM::VER_t Verid() const
|
||||
inline BRM::VER_t Verid() const
|
||||
{
|
||||
return fVerid;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ public:
|
||||
}
|
||||
|
||||
void setReportingFrequency(const uint32_t d);
|
||||
const uint32_t ReportingFrequency() const
|
||||
uint32_t ReportingFrequency() const
|
||||
{
|
||||
return fReportFrequency;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
/**
|
||||
* @brief lbid requested
|
||||
**/
|
||||
const BRM::LBID_t Lbid() const
|
||||
BRM::LBID_t Lbid() const
|
||||
{
|
||||
return fLBID;
|
||||
}
|
||||
@ -146,17 +146,17 @@ public:
|
||||
/**
|
||||
* @brief VBBM flag of the LBID/Ver
|
||||
**/
|
||||
const bool Flg() const
|
||||
bool Flg() const
|
||||
{
|
||||
return fFlg;
|
||||
}
|
||||
|
||||
const BRM::VER_t Txn() const
|
||||
BRM::VER_t Txn() const
|
||||
{
|
||||
return fTxn;
|
||||
}
|
||||
|
||||
const int CompType() const
|
||||
int CompType() const
|
||||
{
|
||||
return fCompType;
|
||||
}
|
||||
@ -164,7 +164,7 @@ public:
|
||||
/**
|
||||
* @brief number of blocks requested
|
||||
**/
|
||||
const uint32_t BlocksRequested() const
|
||||
uint32_t BlocksRequested() const
|
||||
{
|
||||
return fLength;
|
||||
}
|
||||
@ -180,11 +180,11 @@ public:
|
||||
/**
|
||||
* @brief number of blocks read from disk
|
||||
**/
|
||||
const uint32_t BlocksRead() const
|
||||
uint32_t BlocksRead() const
|
||||
{
|
||||
return fblksRead;
|
||||
}
|
||||
const uint32_t BlocksLoaded() const
|
||||
uint32_t BlocksLoaded() const
|
||||
{
|
||||
return fblksLoaded;
|
||||
}
|
||||
|
@ -1368,7 +1368,7 @@ void ioManager::buildOidFileName(const BRM::OID_t oid, uint16_t dbRoot, const ui
|
||||
fFileOp.getFileNameForPrimProc(oid, file_name, dbRoot, partNum, segNum);
|
||||
}
|
||||
|
||||
const int ioManager::localLbidLookup(BRM::LBID_t lbid,
|
||||
int ioManager::localLbidLookup(BRM::LBID_t lbid,
|
||||
BRM::VER_t verid,
|
||||
bool vbFlag,
|
||||
BRM::OID_t& oid,
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
return fConfig;
|
||||
}
|
||||
|
||||
const int localLbidLookup(BRM::LBID_t lbid,
|
||||
int localLbidLookup(BRM::LBID_t lbid,
|
||||
BRM::VER_t verid,
|
||||
bool vbFlag,
|
||||
BRM::OID_t& oid,
|
||||
@ -88,7 +88,7 @@ public:
|
||||
const uint16_t segNum,
|
||||
char* file_name);
|
||||
|
||||
const uint32_t getExtentRows()
|
||||
uint32_t getExtentRows()
|
||||
{
|
||||
return fdbrm.getExtentRows();
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ void BPPSeeder::sendErrorMsg(uint32_t id, uint16_t status, uint32_t step)
|
||||
{
|
||||
|
||||
ISMPacketHeader ism;
|
||||
PrimitiveHeader ph = {0};
|
||||
PrimitiveHeader ph = {0,0,0,0,0,0};
|
||||
|
||||
ism.Status = status;
|
||||
ph.UniqueID = id;
|
||||
|
@ -899,7 +899,7 @@ void ColumnCommand::enableFilters()
|
||||
* RETURN:
|
||||
* emptyVal - the value of empty row
|
||||
***********************************************************/
|
||||
const uint64_t ColumnCommand::getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const
|
||||
uint64_t ColumnCommand::getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const
|
||||
{
|
||||
uint64_t emptyVal = 0;
|
||||
int offset;
|
||||
@ -998,7 +998,7 @@ void ColumnCommand::getLBIDList(uint32_t loopCount, vector<int64_t>* lbids)
|
||||
lbids->push_back(i);
|
||||
}
|
||||
|
||||
const int64_t ColumnCommand::getLastLbid()
|
||||
int64_t ColumnCommand::getLastLbid()
|
||||
{
|
||||
if (!_isScan)
|
||||
return 0;
|
||||
|
@ -82,8 +82,8 @@ public:
|
||||
makeAbsRids = m;
|
||||
}
|
||||
bool willPrefetch();
|
||||
const uint64_t getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const;
|
||||
const int64_t getLastLbid();
|
||||
uint64_t getEmptyRowValue( const execplan::CalpontSystemCatalog::ColDataType dataType, const int width ) const;
|
||||
int64_t getLastLbid();
|
||||
void getLBIDList(uint32_t loopCount, std::vector<int64_t>* lbids);
|
||||
|
||||
virtual SCommand duplicate();
|
||||
|
@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
|
||||
// int fCacheCount;
|
||||
const int ReadAheadBlocks() const
|
||||
int ReadAheadBlocks() const
|
||||
{
|
||||
return fReadAheadBlocks;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace storagemanager
|
||||
class CloudStorage
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~CloudStorage(){};
|
||||
/* These behave like syscalls. return code -1 means an error, and errno is set */
|
||||
virtual int getObject(const std::string &sourceKey, const std::string &destFile, size_t *size = NULL) = 0;
|
||||
virtual int getObject(const std::string &sourceKey, boost::shared_array<uint8_t> *data, size_t *size = NULL) = 0;
|
||||
|
@ -33,6 +33,7 @@ namespace storagemanager
|
||||
class ConfigListener
|
||||
{
|
||||
public:
|
||||
virtual ~ConfigListener(){};
|
||||
virtual void configListener() = 0;
|
||||
};
|
||||
|
||||
|
@ -77,7 +77,7 @@ class Downloader : public ConfigListener
|
||||
{
|
||||
Download(const std::string &source, const boost::filesystem::path &_dlPath, boost::mutex *, Downloader *);
|
||||
Download(const std::string &source);
|
||||
~Download();
|
||||
virtual ~Download();
|
||||
void operator()();
|
||||
boost::filesystem::path dlPath;
|
||||
const std::string key;
|
||||
|
@ -91,6 +91,7 @@ class Synchronizer : public boost::noncopyable , public ConfigListener
|
||||
|
||||
struct Job : public ThreadPool::Job
|
||||
{
|
||||
virtual ~Job(){};
|
||||
Job(Synchronizer *s, std::list<std::string>::iterator i);
|
||||
void operator()();
|
||||
Synchronizer *sync;
|
||||
|
@ -40,6 +40,7 @@ class ThreadPool : public boost::noncopyable
|
||||
class Job
|
||||
{
|
||||
public:
|
||||
virtual ~Job(){};
|
||||
virtual void operator()() = 0;
|
||||
};
|
||||
|
||||
|
@ -170,15 +170,15 @@ public:
|
||||
return getDoubleVal(row, fp, isNull, op_ct);
|
||||
}
|
||||
|
||||
const float floatNullVal() const
|
||||
float floatNullVal() const
|
||||
{
|
||||
return fFloatNullVal;
|
||||
}
|
||||
const double doubleNullVal() const
|
||||
double doubleNullVal() const
|
||||
{
|
||||
return fDoubleNullVal;
|
||||
}
|
||||
const long double longDoubleNullVal() const
|
||||
long double longDoubleNullVal() const
|
||||
{
|
||||
return fLongDoubleNullVal;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const void stringValue(execplan::SPTP& fp, rowgroup::Row& row, bool& isNull, std::string& fFloatStr)
|
||||
void stringValue(execplan::SPTP& fp, rowgroup::Row& row, bool& isNull, std::string& fFloatStr)
|
||||
{
|
||||
// Bug3788, use the shorter of fixed or scientific notation for floating point values.
|
||||
// [ the default format in treenode.h is fixed-point notation ]
|
||||
|
@ -42,6 +42,7 @@ class CompressedInetStreamSocket : public InetStreamSocket
|
||||
{
|
||||
public:
|
||||
CompressedInetStreamSocket();
|
||||
virtual ~CompressedInetStreamSocket(){};
|
||||
|
||||
virtual Socket* clone() const;
|
||||
virtual const SBS read(const struct timespec* timeout = 0, bool* isTimeOut = NULL,
|
||||
|
@ -1105,7 +1105,7 @@ const string InetStreamSocket::addr2String() const
|
||||
return s;
|
||||
}
|
||||
|
||||
const bool InetStreamSocket::isSameAddr(const Socket* rhs) const
|
||||
bool InetStreamSocket::isSameAddr(const Socket* rhs) const
|
||||
{
|
||||
const InetStreamSocket* issp = dynamic_cast<const InetStreamSocket*>(rhs);
|
||||
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
/** test if this socket is open
|
||||
*
|
||||
*/
|
||||
inline virtual const bool isOpen() const;
|
||||
inline virtual bool isOpen() const;
|
||||
|
||||
/** read a message from the socket
|
||||
*
|
||||
@ -180,7 +180,7 @@ public:
|
||||
fSyncProto = use;
|
||||
}
|
||||
|
||||
const int getConnectionNum() const
|
||||
int getConnectionNum() const
|
||||
{
|
||||
return fSocketParms.sd();
|
||||
}
|
||||
@ -199,7 +199,7 @@ public:
|
||||
/** compare 2 addresses
|
||||
*
|
||||
*/
|
||||
virtual const bool isSameAddr(const Socket* rhs) const;
|
||||
virtual bool isSameAddr(const Socket* rhs) const;
|
||||
|
||||
/** ping an ip address
|
||||
*
|
||||
@ -255,7 +255,7 @@ private:
|
||||
void doCopy(const InetStreamSocket& rhs);
|
||||
};
|
||||
|
||||
inline const bool InetStreamSocket::isOpen() const
|
||||
inline bool InetStreamSocket::isOpen() const
|
||||
{
|
||||
return (fSocketParms.sd() >= 0);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
/** test if the socket is open
|
||||
*
|
||||
*/
|
||||
inline virtual const bool isOpen() const;
|
||||
inline virtual bool isOpen() const;
|
||||
|
||||
/** get the socket params
|
||||
*
|
||||
@ -150,7 +150,7 @@ public:
|
||||
fSocket->syncProto(use);
|
||||
}
|
||||
|
||||
EXPORT virtual const int getConnectionNum() const;
|
||||
EXPORT virtual int getConnectionNum() const;
|
||||
|
||||
// Debug
|
||||
EXPORT void setSockID(uint32_t id)
|
||||
@ -175,7 +175,7 @@ public:
|
||||
/**
|
||||
* @brief compare 2 addresses
|
||||
*/
|
||||
virtual const bool isSameAddr(const IOSocket* rhs) const
|
||||
virtual bool isSameAddr(const IOSocket* rhs) const
|
||||
{
|
||||
return fSocket->isSameAddr(rhs->fSocket);
|
||||
}
|
||||
@ -235,7 +235,7 @@ inline void IOSocket::close()
|
||||
{
|
||||
if (fSocket) fSocket->close();
|
||||
}
|
||||
inline const bool IOSocket::isOpen() const
|
||||
inline bool IOSocket::isOpen() const
|
||||
{
|
||||
return (fSocket && fSocket->isOpen());
|
||||
}
|
||||
@ -274,7 +274,7 @@ inline void IOSocket::setSocketImpl(Socket* socket)
|
||||
delete fSocket;
|
||||
fSocket = socket;
|
||||
}
|
||||
inline const int IOSocket::getConnectionNum() const
|
||||
inline int IOSocket::getConnectionNum() const
|
||||
{
|
||||
return fSocket->getConnectionNum();
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ public:
|
||||
{
|
||||
return fOtherEnd;
|
||||
}
|
||||
EXPORT const bool isAvailable() const
|
||||
EXPORT bool isAvailable() const
|
||||
{
|
||||
return fIsAvailable;
|
||||
}
|
||||
@ -267,7 +267,7 @@ public:
|
||||
/**
|
||||
* @brief compare the addresses of 2 MessageQueueClient
|
||||
*/
|
||||
inline const bool isSameAddr(const MessageQueueClient& rhs) const;
|
||||
inline bool isSameAddr(const MessageQueueClient& rhs) const;
|
||||
|
||||
bool isConnected()
|
||||
{
|
||||
@ -316,7 +316,7 @@ inline const std::string MessageQueueClient::addr2String() const
|
||||
{
|
||||
return fClientSock.addr2String();
|
||||
}
|
||||
inline const bool MessageQueueClient::isSameAddr(const MessageQueueClient& rhs) const
|
||||
inline bool MessageQueueClient::isSameAddr(const MessageQueueClient& rhs) const
|
||||
{
|
||||
return fClientSock.isSameAddr(&rhs.fClientSock);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
/** test if this socket is open
|
||||
*
|
||||
*/
|
||||
virtual const bool isOpen() const = 0;
|
||||
virtual bool isOpen() const = 0;
|
||||
|
||||
/** get the SocketParms
|
||||
*
|
||||
@ -158,7 +158,7 @@ public:
|
||||
*/
|
||||
virtual void syncProto(bool use) = 0;
|
||||
|
||||
virtual const int getConnectionNum() const = 0;
|
||||
virtual int getConnectionNum() const = 0;
|
||||
|
||||
/** return the address as a string
|
||||
*
|
||||
@ -168,7 +168,7 @@ public:
|
||||
/** compare 2 addresses
|
||||
*
|
||||
*/
|
||||
virtual const bool isSameAddr(const Socket* rhs) const = 0;
|
||||
virtual bool isSameAddr(const Socket* rhs) const = 0;
|
||||
|
||||
virtual bool isConnected() const = 0;
|
||||
virtual bool hasData() const = 0;
|
||||
|
@ -277,7 +277,7 @@ void PriorityThreadPool::threadFcn(const Priority preferredQueue) throw()
|
||||
void PriorityThreadPool::sendErrorMsg(uint32_t id, uint32_t step, primitiveprocessor::SP_UM_IOSOCK sock)
|
||||
{
|
||||
ISMPacketHeader ism;
|
||||
PrimitiveHeader ph = {};
|
||||
PrimitiveHeader ph = {0,0,0,0,0,0};
|
||||
|
||||
ism.Status = logging::primitiveServerErr;
|
||||
ph.UniqueID = id;
|
||||
|
@ -3257,7 +3257,7 @@ boost::shared_array<SIDTIDEntry> DBRM::SIDTIDMap(int& len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
const uint32_t DBRM::getUnique32()
|
||||
uint32_t DBRM::getUnique32()
|
||||
{
|
||||
#ifdef BRM_INFO
|
||||
|
||||
@ -3306,7 +3306,7 @@ const uint32_t DBRM::getUnique32()
|
||||
return ret;
|
||||
}
|
||||
|
||||
const uint64_t DBRM::getUnique64()
|
||||
uint64_t DBRM::getUnique64()
|
||||
{
|
||||
#ifdef BRM_INFO
|
||||
|
||||
|
@ -791,8 +791,8 @@ public:
|
||||
|
||||
/* Note, these pull #s from two separate sequences. That is, they both
|
||||
return 0, then 1, 2, 3, etc. */
|
||||
EXPORT const uint32_t getUnique32();
|
||||
EXPORT const uint64_t getUnique64();
|
||||
EXPORT uint32_t getUnique32();
|
||||
EXPORT uint64_t getUnique64();
|
||||
|
||||
/* New table lock interface */
|
||||
/* returns a unique ID (> 0) for the lock on success, 0 on failure.
|
||||
|
@ -357,7 +357,7 @@ public:
|
||||
* TableInfo::fSyncUpdatesTI mutex should be locked when calling this
|
||||
* function (see fColumnLocks discussion).
|
||||
*/
|
||||
const int getColumnLocker(const int& columnId) const
|
||||
int getColumnLocker(const int& columnId) const
|
||||
{
|
||||
return fColumnLocks[columnId].locker;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ int Dctnry::createDctnry( const OID& dctnryOID, int colWidth,
|
||||
}
|
||||
|
||||
rc = BRMWrapper::getInstance()->allocateDictStoreExtent(
|
||||
(const OID)m_dctnryOID, m_dbRoot, m_partition, m_segment,
|
||||
(OID)m_dctnryOID, m_dbRoot, m_partition, m_segment,
|
||||
startLbid, allocSize);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
/**
|
||||
* @brief Mutator to enable/disable debug logging to console.
|
||||
*/
|
||||
const void setDebugConsole ( bool debug )
|
||||
void setDebugConsole ( bool debug )
|
||||
{
|
||||
fDebugConsole = debug;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void Cache::clear()
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::flushCache()
|
||||
int Cache::flushCache()
|
||||
{
|
||||
bool bHasReadBlock = false;
|
||||
BlockBuffer* curBuf;
|
||||
@ -216,7 +216,7 @@ void Cache::freeMemory()
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::getListSize( const CacheListType listType )
|
||||
int Cache::getListSize( const CacheListType listType )
|
||||
{
|
||||
int size = 0;
|
||||
|
||||
@ -287,7 +287,7 @@ void Cache::init( const int totalBlock, const int chkPoint, const int pctFree )
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf )
|
||||
int Cache::insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf )
|
||||
{
|
||||
BlockBuffer* buffer;
|
||||
vector<BlockBuffer*>::iterator it;
|
||||
@ -322,7 +322,7 @@ const int Cache::insertLRUList( CommBlock& cb, const uint64_t lbid, const uint6
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::loadCacheBlock( const CacheKey& key, unsigned char* buf )
|
||||
int Cache::loadCacheBlock( const CacheKey& key, unsigned char* buf )
|
||||
{
|
||||
BlockBuffer* buffer;
|
||||
CacheMapIt iter;
|
||||
@ -356,7 +356,7 @@ const int Cache::loadCacheBlock( const CacheKey& key, unsigned char* buf )
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::modifyCacheBlock( const CacheKey& key, const unsigned char* buf )
|
||||
int Cache::modifyCacheBlock( const CacheKey& key, const unsigned char* buf )
|
||||
{
|
||||
BlockBuffer* buffer;
|
||||
CacheMapIt iter;
|
||||
@ -437,7 +437,7 @@ void Cache::printCacheList()
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType )
|
||||
int Cache::processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType )
|
||||
{
|
||||
RETURN_ON_NULL( buffer, ERR_NULL_BLOCK );
|
||||
CacheMapIt iter;
|
||||
|
@ -100,16 +100,16 @@ public:
|
||||
/**
|
||||
* @brief Check whether cache key exists
|
||||
*/
|
||||
static const bool cacheKeyExist( CacheMap* map, const OID oid, const uint64_t lbid )
|
||||
static bool cacheKeyExist( CacheMap* map, const OID oid, const uint64_t lbid )
|
||||
{
|
||||
CacheKey key = getCacheKey( oid, lbid );
|
||||
return map->find(key) == map->end() ? false : true;
|
||||
}
|
||||
static const bool cacheKeyExist( CacheMap* map, BlockBuffer* buffer )
|
||||
static bool cacheKeyExist( CacheMap* map, BlockBuffer* buffer )
|
||||
{
|
||||
return cacheKeyExist( map, (*buffer).cb.file.oid, (*buffer).block.lbid );
|
||||
}
|
||||
static const bool cacheKeyExist( const OID oid, const uint64_t lbid )
|
||||
static bool cacheKeyExist( const OID oid, const uint64_t lbid )
|
||||
{
|
||||
return cacheKeyExist( m_lruList, oid, lbid ) || cacheKeyExist( m_writeList, oid, lbid );
|
||||
}
|
||||
@ -127,7 +127,7 @@ public:
|
||||
/**
|
||||
* @brief Flush the write cache
|
||||
*/
|
||||
EXPORT static const int flushCache();
|
||||
EXPORT static int flushCache();
|
||||
|
||||
/**
|
||||
* @brief Get the cache key
|
||||
@ -142,7 +142,7 @@ public:
|
||||
return getCacheKey( (*buffer).cb.file.oid, (*buffer).block.lbid );
|
||||
}
|
||||
|
||||
EXPORT static const int getListSize( const CacheListType listType );
|
||||
EXPORT static int getListSize( const CacheListType listType );
|
||||
|
||||
/**
|
||||
* @brief Init the buffers
|
||||
@ -156,8 +156,8 @@ public:
|
||||
/**
|
||||
* @brief Insert into LRU list
|
||||
*/
|
||||
EXPORT static const int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf );
|
||||
static const int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const DataBlock& block )
|
||||
EXPORT static int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf );
|
||||
static int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const DataBlock& block )
|
||||
{
|
||||
return insertLRUList( cb, lbid, fbo, block.data );
|
||||
}
|
||||
@ -170,20 +170,20 @@ public:
|
||||
/**
|
||||
* @brief Load cache block to a buffer
|
||||
*/
|
||||
static const int loadCacheBlock( const CacheKey& key, DataBlock& block )
|
||||
static int loadCacheBlock( const CacheKey& key, DataBlock& block )
|
||||
{
|
||||
return loadCacheBlock( key, block.data );
|
||||
}
|
||||
EXPORT static const int loadCacheBlock( const CacheKey& key, unsigned char* buf );
|
||||
EXPORT static int loadCacheBlock( const CacheKey& key, unsigned char* buf );
|
||||
|
||||
/**
|
||||
* @brief Modify a cache block
|
||||
*/
|
||||
static const int modifyCacheBlock( const CacheKey& key, const DataBlock& block )
|
||||
static int modifyCacheBlock( const CacheKey& key, const DataBlock& block )
|
||||
{
|
||||
return modifyCacheBlock( key, block.data );
|
||||
}
|
||||
EXPORT static const int modifyCacheBlock( const CacheKey& key, const unsigned char* buf );
|
||||
EXPORT static int modifyCacheBlock( const CacheKey& key, const unsigned char* buf );
|
||||
|
||||
/**
|
||||
* @brief Print
|
||||
@ -194,14 +194,14 @@ public:
|
||||
/**
|
||||
* @brief Insert/Delete an element in cache map
|
||||
*/
|
||||
EXPORT static const int processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType );
|
||||
EXPORT static int processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType );
|
||||
|
||||
// accessory
|
||||
static const int getTotalBlock()
|
||||
static int getTotalBlock()
|
||||
{
|
||||
return m_cacheParam->totalBlock;
|
||||
}
|
||||
static const bool getUseCache()
|
||||
static bool getUseCache()
|
||||
{
|
||||
return m_useCache;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ int DbFileOp::readDBFile( CommBlock& cb,
|
||||
* NO_ERROR if success
|
||||
* other number if something wrong
|
||||
***********************************************************/
|
||||
const int DbFileOp::readSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
int DbFileOp::readSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -229,7 +229,7 @@ const int DbFileOp::readSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
}
|
||||
|
||||
|
||||
const int DbFileOp::readSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
int DbFileOp::readSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -406,7 +406,7 @@ int DbFileOp::writeDBFileFbo(IDBDataFile* pFile, const unsigned char* writeBuf,
|
||||
* NO_ERROR if success
|
||||
* other number if something wrong
|
||||
***********************************************************/
|
||||
const int DbFileOp::writeSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
int DbFileOp::writeSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -417,7 +417,7 @@ const int DbFileOp::writeSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
return writeDBFile( pFile, block->data, lbid );
|
||||
}
|
||||
|
||||
const int DbFileOp::writeSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
int DbFileOp::writeSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -438,7 +438,7 @@ const int DbFileOp::writeSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
* NO_ERROR if success
|
||||
* other number if something wrong
|
||||
***********************************************************/
|
||||
const int DbFileOp::writeVB( IDBDataFile* pFile, const OID oid, const uint64_t lbid )
|
||||
int DbFileOp::writeVB( IDBDataFile* pFile, const OID oid, const uint64_t lbid )
|
||||
{
|
||||
if ( !BRMWrapper::getUseVb() )
|
||||
return NO_ERROR;
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
* @brief Get an entry within a subblock and also populate block buffer
|
||||
*
|
||||
*/
|
||||
EXPORT const int readSubBlockEntry(IDBDataFile* pFile,
|
||||
EXPORT int readSubBlockEntry(IDBDataFile* pFile,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -113,7 +113,7 @@ public:
|
||||
const int width,
|
||||
void* pStruct ) ;
|
||||
|
||||
EXPORT const int readSubBlockEntry(CommBlock& cb,
|
||||
EXPORT int readSubBlockEntry(CommBlock& cb,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -196,7 +196,7 @@ public:
|
||||
/**
|
||||
* @brief Write a sub block entry directly to a DB file
|
||||
*/
|
||||
EXPORT const int writeSubBlockEntry(IDBDataFile* pFile,
|
||||
EXPORT int writeSubBlockEntry(IDBDataFile* pFile,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -204,7 +204,7 @@ public:
|
||||
const int width,
|
||||
void* pStruct );
|
||||
|
||||
EXPORT const int writeSubBlockEntry(CommBlock& cb,
|
||||
EXPORT int writeSubBlockEntry(CommBlock& cb,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -215,7 +215,7 @@ public:
|
||||
/**
|
||||
* @brief Write to version buffer
|
||||
*/
|
||||
EXPORT const int writeVB( IDBDataFile* pFile,
|
||||
EXPORT int writeVB( IDBDataFile* pFile,
|
||||
const OID oid,
|
||||
const uint64_t lbid );
|
||||
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
|
||||
/** @brief get the CurrentDBRootIdx
|
||||
*/
|
||||
inline const int getCurrentDBRootIdx()
|
||||
inline int getCurrentDBRootIdx()
|
||||
{
|
||||
boost::mutex::scoped_lock lock(fDBRootExtTrkMutex);
|
||||
return fCurrentDBRootIdx;
|
||||
|
@ -256,7 +256,7 @@ int FileOp::createFile(FID fid,
|
||||
BRM::LBID_t startLbid;
|
||||
uint32_t startBlock;
|
||||
RETURN_ON_ERROR( BRMWrapper::getInstance()->allocateColExtentExactFile(
|
||||
(const OID)fid, (uint32_t)width, dbRootx, partitionx, segment, colDataType,
|
||||
(OID)fid, (uint32_t)width, dbRootx, partitionx, segment, colDataType,
|
||||
startLbid, allocSize, startBlock) );
|
||||
|
||||
// We allocate a full extent from BRM, but only write an abbreviated 256K
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
/**
|
||||
* @brief Is it required to debug
|
||||
*/
|
||||
const bool isDebug( const DebugLevel level ) const
|
||||
bool isDebug( const DebugLevel level ) const
|
||||
{
|
||||
return level <= m_debugLevel;
|
||||
}
|
||||
@ -57,7 +57,7 @@ public:
|
||||
/**
|
||||
* @brief Get debug level
|
||||
*/
|
||||
const DebugLevel getDebugLevel() const
|
||||
DebugLevel getDebugLevel() const
|
||||
{
|
||||
return m_debugLevel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user