1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-4566: Add rebuildEM tool support to work with compressed files.

* This patch adds rebuildEM tool support to work with compressed files.
* This patch increases a version of the file header.

Note: Default version of the `rebuildEM` tool was using very old API,
those functions are not present currently. So `rebuildEM` will not work with
files created without compression, because we cannot deduce some info which are
needed to create column extent.
This commit is contained in:
Denis Khalikov
2021-03-10 17:23:13 +03:00
parent 2eec956977
commit 5d497e8821
25 changed files with 1560 additions and 406 deletions

View File

@@ -483,7 +483,7 @@ int ColumnOp::allocRowId(const TxnID& txnid, bool useStartingExtent,
return rc;
//@Bug 3164 update compressed extent
updateColumnExtent(newCol.dataFile.pFile, allocSize);
updateColumnExtent(newCol.dataFile.pFile, allocSize, /*lbid=*/0);
//..Search first block of new extent for empty rows
rc = readBlock(newCol.dataFile.pFile, buf, newHwm);

View File

@@ -210,9 +210,9 @@ int ColumnOpCompress1::expandAbbrevColumnExtent(
}
int ColumnOpCompress1::updateColumnExtent(IDBDataFile* pFile, int nBlocks)
int ColumnOpCompress1::updateColumnExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid)
{
return m_chunkManager->updateColumnExtent(pFile, nBlocks);
return m_chunkManager->updateColumnExtent(pFile, nBlocks, lbid);
}

View File

@@ -160,7 +160,7 @@ protected:
/**
* @brief virtual method in FileOp
*/
int updateColumnExtent(IDBDataFile* pFile, int nBlocks);
int updateColumnExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid);
/**
* @brief virtual method in ColumnOp

View File

@@ -90,16 +90,20 @@ DctnryCompress1::~DctnryCompress1()
delete m_chunkManager;
}
int DctnryCompress1::updateDctnryExtent(IDBDataFile* pFile, int nBlocks)
int DctnryCompress1::updateDctnryExtent(IDBDataFile* pFile, int nBlocks,
int64_t lbid)
{
return m_chunkManager->updateDctnryExtent(pFile, nBlocks);
return m_chunkManager->updateDctnryExtent(pFile, nBlocks, lbid);
}
IDBDataFile* DctnryCompress1::createDctnryFile(const char* name, int width, const char* mode, int ioBuffSize)
IDBDataFile* DctnryCompress1::createDctnryFile(const char* name, int width,
const char* mode,
int ioBuffSize,
BRM::LBID_t lbid)
{
return m_chunkManager->createDctnryFile(
m_dctnryOID, width, m_dbRoot, m_partition, m_segment, name, mode, ioBuffSize);
return m_chunkManager->createDctnryFile(m_dctnryOID, width, m_dbRoot,
m_partition, m_segment, name, mode,
ioBuffSize, lbid);
}

View File

@@ -97,7 +97,9 @@ public:
/**
* @brief virtual method in Dctnry
*/
IDBDataFile* createDctnryFile(const char* name, int width, const char* mode, int ioBuffSize);
IDBDataFile* createDctnryFile(const char* name, int width,
const char* mode, int ioBuffSize,
int64_t lbid);
/**
* @brief virtual method in Dctnry
@@ -159,7 +161,7 @@ protected:
/**
* @brief virtual method in FileOp
*/
int updateDctnryExtent(IDBDataFile* pFile, int nBlocks);
int updateDctnryExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid);
/**
* @brief convert lbid to fbo