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

MCOL-454 I_S.COLUMNSTORE_FILES multi-node

I_S.COLUMNSTORE_FILES returned bad filenames and NULL file sizes when
there are multiple nodes in a ColumnStore cluster

It adds an extra message call to the WriteEngine to get the file size
for that file. The I_S function will figure out which WriteEngine to
communicate with and get the file size details from it.
This commit is contained in:
Andrew Hutchings
2016-12-14 16:55:03 +00:00
parent fae09df1b7
commit 025838629b
5 changed files with 104 additions and 9 deletions

View File

@ -245,6 +245,38 @@ struct ColumnThread
bool fReportRealUse;
int fKey;
};
//------------------------------------------------------------------------------
// Get file size from file name in bytestream object
//------------------------------------------------------------------------------
int WE_GetFileSizes::processFileName(
messageqcpp::ByteStream& bs,
std::string& errMsg, int key)
{
uint8_t rc = 0;
off_t fileSize;
off_t compressedFileSize;
errMsg.clear();
try
{
std::string fileName;
bs >> fileName;
fileSize = IDBPolicy::size(fileName.c_str());
compressedFileSize = IDBPolicy::compressedSize(fileName.c_str());
}
catch(std::exception& ex)
{
errMsg = ex.what();
rc = 1;
}
bs.reset();
bs << fileSize;
bs << compressedFileSize;
return rc;
}
//------------------------------------------------------------------------------
// Process a table size based on input from the
// bytestream object.