You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Reformat all code to coding standard
This commit is contained in:
@ -34,84 +34,88 @@ namespace WriteEngine
|
||||
{
|
||||
|
||||
/** Class FreeMgr */
|
||||
class FreeMgr : public DbFileOp
|
||||
class FreeMgr : public DbFileOp
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
FreeMgr();
|
||||
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
~FreeMgr();
|
||||
|
||||
/**
|
||||
* @brief init free chains in a new index file
|
||||
*/
|
||||
const int init( CommBlock &cb, const int freemgrType );
|
||||
|
||||
/**
|
||||
* @brief Init free chains in a new file or an existing file
|
||||
* The start block is an FBO or an LBID depending on whether we are using BRM
|
||||
**/
|
||||
const int init( CommBlock &cb, DataBlock* blockZero, const int freemgrType , const IdxTreeGroupType chainType, const int startBlock, const int numberBlocks );
|
||||
|
||||
/**
|
||||
* @brief find a free segment and return ptr
|
||||
*/
|
||||
const int assignSegment( CommBlock &cb, DataBlock* blockZero, const int freemgr_type, const IdxTreeGroupType segmentType, IdxEmptyListEntry* assignPtr ) ;
|
||||
|
||||
/**
|
||||
* @brief put a free segment back into chain
|
||||
*/
|
||||
const int releaseSegment( CommBlock &cb, DataBlock* blockZero, const int freemgr_type, const IdxTreeGroupType segmentType, IdxEmptyListEntry* assignPtr ) ;
|
||||
|
||||
/**
|
||||
* @brief Map an FBO to LBID
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
const uint64_t mapLBID( CommBlock &cb, const uint64_t fbo, int &rc );
|
||||
|
||||
/**
|
||||
* extendFreespace - ran out of space in one of the chains?
|
||||
* Add blocks via calls to BRM extent mgr and fseek the file to the end
|
||||
FreeMgr();
|
||||
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
~FreeMgr();
|
||||
|
||||
/**
|
||||
* @brief init free chains in a new index file
|
||||
*/
|
||||
const int init( CommBlock& cb, const int freemgrType );
|
||||
|
||||
/**
|
||||
* @brief Init free chains in a new file or an existing file
|
||||
* The start block is an FBO or an LBID depending on whether we are using BRM
|
||||
**/
|
||||
const int extendFreespace( CommBlock &cb, DataBlock* blockZero, const int freemgr_type );
|
||||
const int init( CommBlock& cb, DataBlock* blockZero, const int freemgrType, const IdxTreeGroupType chainType, const int startBlock, const int numberBlocks );
|
||||
|
||||
/**
|
||||
* @brief find a free segment and return ptr
|
||||
*/
|
||||
const int assignSegment( CommBlock& cb, DataBlock* blockZero, const int freemgr_type, const IdxTreeGroupType segmentType, IdxEmptyListEntry* assignPtr ) ;
|
||||
|
||||
/**
|
||||
* @brief put a free segment back into chain
|
||||
*/
|
||||
const int releaseSegment( CommBlock& cb, DataBlock* blockZero, const int freemgr_type, const IdxTreeGroupType segmentType, IdxEmptyListEntry* assignPtr ) ;
|
||||
|
||||
/**
|
||||
* @brief Map an FBO to LBID
|
||||
*/
|
||||
const uint64_t mapLBID( CommBlock& cb, const uint64_t fbo, int& rc );
|
||||
|
||||
/**
|
||||
* extendFreespace - ran out of space in one of the chains?
|
||||
* Add blocks via calls to BRM extent mgr and fseek the file to the end
|
||||
**/
|
||||
const int extendFreespace( CommBlock& cb, DataBlock* blockZero, const int freemgr_type );
|
||||
|
||||
|
||||
//private:
|
||||
|
||||
|
||||
/**
|
||||
* @brief Create sub block zero for use by free manager
|
||||
*/
|
||||
const int initBlockzero( DataBlock* blockZero);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Handle release of sub-blocks separately - sometimes a sub-block contains list entries and sometimes it is a list entry
|
||||
*/
|
||||
|
||||
const int releaseSubblock( CommBlock &cb, WriteEngine::DataBlock*, int, WriteEngine::IdxEmptyListEntry*) ;
|
||||
|
||||
|
||||
const int releaseSubblock( CommBlock& cb, WriteEngine::DataBlock*, int, WriteEngine::IdxEmptyListEntry*) ;
|
||||
|
||||
/**
|
||||
* @brief Handle assignment of sub-blocks separately - sometimes a sub-block contains list entries and sometimes it is a list entry
|
||||
*/
|
||||
|
||||
const int assignSubblock( CommBlock &cb, WriteEngine::DataBlock*, int, WriteEngine::IdxEmptyListEntry*);
|
||||
|
||||
|
||||
const int assignSubblock( CommBlock& cb, WriteEngine::DataBlock*, int, WriteEngine::IdxEmptyListEntry*);
|
||||
|
||||
/**
|
||||
* Blank out the entries in the structure
|
||||
**/
|
||||
const void nullPtr( WriteEngine::IdxEmptyListEntry* assignPtr ) const;
|
||||
|
||||
|
||||
const void printMemSubBlock( DataBlock* curBlock, const int sbid );
|
||||
|
||||
inline const int calcPtrOffset( const int position ) const
|
||||
{ return 1+position; }
|
||||
|
||||
{
|
||||
return 1 + position;
|
||||
}
|
||||
|
||||
inline const int calcStatOffset( const int position ) const
|
||||
{ return 8+position; }
|
||||
|
||||
{
|
||||
return 8 + position;
|
||||
}
|
||||
|
||||
int initType;// decide which algorithm to use to init the chains
|
||||
int allowExtend; // allow file to be extended
|
||||
};
|
||||
|
Reference in New Issue
Block a user