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
MCOL-3585 Enabled MCOL-498 by default for all dbroots.
This commit is contained in:
@ -316,11 +316,6 @@ ADD_SUBDIRECTORY(storage-manager)
|
|||||||
|
|
||||||
# WriteEngine component tests
|
# WriteEngine component tests
|
||||||
IF( WITH_SHARED_COMP_TESTS )
|
IF( WITH_SHARED_COMP_TESTS )
|
||||||
# search for cppunit
|
|
||||||
INCLUDE (findcppunit.cmake)
|
|
||||||
if (NOT CPPUNIT_FOUND)
|
|
||||||
MESSAGE(FATAL_ERROR "CPPUnit not found please install cppunit-devel for CentOS/RedHat or libcppunit-dev for Ubuntu/Debian")
|
|
||||||
endif()
|
|
||||||
ADD_SUBDIRECTORY(writeengine/shared)
|
ADD_SUBDIRECTORY(writeengine/shared)
|
||||||
ENDIF( WITH_SHARED_COMP_TESTS )
|
ENDIF( WITH_SHARED_COMP_TESTS )
|
||||||
|
|
||||||
|
@ -296,10 +296,9 @@ void IDBPolicy::configIDBPolicy()
|
|||||||
|
|
||||||
if ( setting.length() != 0 )
|
if ( setting.length() != 0 )
|
||||||
{
|
{
|
||||||
if ( setting.size() == 3
|
if ( setting.size() == 2
|
||||||
&& ( setting[0] == 'O' || setting[0] == 'o' )
|
&& ( setting[0] == 'O' || setting[0] == 'o' )
|
||||||
&& ( setting[1] == 'F' || setting[1] == 'f' )
|
&& ( setting[1] == 'N' || setting[1] == 'n' )
|
||||||
&& ( setting[2] == 'F' || setting[2] == 'f' )
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// int into uint16_t implicit conversion
|
// int into uint16_t implicit conversion
|
||||||
@ -310,7 +309,7 @@ void IDBPolicy::configIDBPolicy()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDBPolicy::setPreallocSpace(uint16_t dbRoot)
|
void IDBPolicy::enablePreallocSpace(uint16_t dbRoot)
|
||||||
{
|
{
|
||||||
s_PreallocSpace.push_back(dbRoot);
|
s_PreallocSpace.push_back(dbRoot);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Checks for disk space preallocation feature status for a dbroot
|
* Checks for disk space preallocation feature status for a dbroot
|
||||||
*/
|
*/
|
||||||
static bool PreallocSpace(uint16_t dbRoot);
|
static bool PreallocSpaceDisabled(uint16_t dbRoot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accessor method that returns whether to use HDFS memory buffers
|
* Accessor method that returns whether to use HDFS memory buffers
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* This is used in WE shared components Unit Tests
|
* This is used in WE shared components Unit Tests
|
||||||
*/
|
*/
|
||||||
static void setPreallocSpace(uint16_t dbRoot);
|
static void enablePreallocSpace(uint16_t dbRoot);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
@ -178,11 +178,11 @@ bool IDBPolicy::useCloud()
|
|||||||
|
|
||||||
// MCOL-498 Looking for dbRoot in the List set in configIDBPolicy.
|
// MCOL-498 Looking for dbRoot in the List set in configIDBPolicy.
|
||||||
inline
|
inline
|
||||||
bool IDBPolicy::PreallocSpace(uint16_t dbRoot)
|
bool IDBPolicy::PreallocSpaceDisabled(uint16_t dbRoot)
|
||||||
{
|
{
|
||||||
std::vector<uint16_t>::iterator dbRootIter =
|
std::vector<uint16_t>::iterator dbRootIter =
|
||||||
find(s_PreallocSpace.begin(), s_PreallocSpace.end(), dbRoot);
|
find(s_PreallocSpace.begin(), s_PreallocSpace.end(), dbRoot);
|
||||||
return dbRootIter != s_PreallocSpace.end();
|
return dbRootIter == s_PreallocSpace.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
|
@ -1017,7 +1017,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||||
CPPUNIT_ASSERT(bFile->size() == 67108864);
|
CPPUNIT_ASSERT(bFile->size() == 2105344);
|
||||||
fileOp.closeFile(pFile);
|
fileOp.closeFile(pFile);
|
||||||
// file has been extended delete the file before
|
// file has been extended delete the file before
|
||||||
// the second run
|
// the second run
|
||||||
@ -1046,8 +1046,8 @@ public:
|
|||||||
bFile = new idbdatafile::BufferedFile(fileName, "r+b", 0);
|
bFile = new idbdatafile::BufferedFile(fileName, "r+b", 0);
|
||||||
pFile = dynamic_cast<IDBDataFile*>(bFile);
|
pFile = dynamic_cast<IDBDataFile*>(bFile);
|
||||||
|
|
||||||
// disable disk space preallocation and extend
|
// enable disk space preallocation and extend
|
||||||
idbdatafile::IDBPolicy::setPreallocSpace(dbRoot);
|
idbdatafile::IDBPolicy::enablePreallocSpace(dbRoot);
|
||||||
rc = fileOp.initColumnExtent(pFile,
|
rc = fileOp.initColumnExtent(pFile,
|
||||||
dbRoot,
|
dbRoot,
|
||||||
BYTE_PER_BLOCK, // number of blocks
|
BYTE_PER_BLOCK, // number of blocks
|
||||||
@ -1060,7 +1060,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||||
CPPUNIT_ASSERT(bFile->size() == 2105344);
|
CPPUNIT_ASSERT(bFile->size() == 67108864);
|
||||||
fileOp.closeFile(pFile);
|
fileOp.closeFile(pFile);
|
||||||
// file has been extended
|
// file has been extended
|
||||||
|
|
||||||
@ -1114,7 +1114,7 @@ public:
|
|||||||
false,
|
false,
|
||||||
false ); //enable preallocation
|
false ); //enable preallocation
|
||||||
// Check the file size and remove the file
|
// Check the file size and remove the file
|
||||||
CPPUNIT_ASSERT(bFile->size() == 67379200);
|
CPPUNIT_ASSERT(bFile->size() == 483328);
|
||||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||||
fileOp.deleteFile( fileName );
|
fileOp.deleteFile( fileName );
|
||||||
CPPUNIT_ASSERT(fileOp.exists( fileName ) == false);
|
CPPUNIT_ASSERT(fileOp.exists( fileName ) == false);
|
||||||
@ -1129,8 +1129,8 @@ public:
|
|||||||
bFile = (idbdatafile::BufferedFile*)m_dFile;
|
bFile = (idbdatafile::BufferedFile*)m_dFile;
|
||||||
CPPUNIT_ASSERT(m_dFile != NULL);
|
CPPUNIT_ASSERT(m_dFile != NULL);
|
||||||
|
|
||||||
// disable preallocation and create a Dictionary
|
// enable preallocation and create a Dictionary
|
||||||
idbdatafile::IDBPolicy::setPreallocSpace(dbRoot);
|
idbdatafile::IDBPolicy::enablePreallocSpace(dbRoot);
|
||||||
m_Dctnry.compressionType(1);
|
m_Dctnry.compressionType(1);
|
||||||
rc = m_Dctnry.initDctnryExtent( m_dFile,
|
rc = m_Dctnry.initDctnryExtent( m_dFile,
|
||||||
dbRoot,
|
dbRoot,
|
||||||
@ -1141,7 +1141,7 @@ public:
|
|||||||
true ); //skip preallocation
|
true ); //skip preallocation
|
||||||
|
|
||||||
// Check the size and remove the file.
|
// Check the size and remove the file.
|
||||||
CPPUNIT_ASSERT(bFile->size() == 483328);
|
CPPUNIT_ASSERT(bFile->size() == 67379200);
|
||||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||||
fileOp.deleteFile(fileName);
|
fileOp.deleteFile(fileName);
|
||||||
CPPUNIT_ASSERT(fileOp.exists( fileName ) == false);
|
CPPUNIT_ASSERT(fileOp.exists( fileName ) == false);
|
||||||
|
@ -1081,7 +1081,7 @@ int FileOp::initColumnExtent(
|
|||||||
// IMO it is better to check bool then to call a function.
|
// IMO it is better to check bool then to call a function.
|
||||||
if ( bOptExtension )
|
if ( bOptExtension )
|
||||||
{
|
{
|
||||||
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpace(dbRoot))
|
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpaceDisabled(dbRoot))
|
||||||
? bOptExtension : false;
|
? bOptExtension : false;
|
||||||
}
|
}
|
||||||
// Reduce number of blocks allocated for abbreviated extents thus
|
// Reduce number of blocks allocated for abbreviated extents thus
|
||||||
@ -1849,7 +1849,7 @@ int FileOp::initDctnryExtent(
|
|||||||
// CS doesn't optimize non-compressed dict creation.
|
// CS doesn't optimize non-compressed dict creation.
|
||||||
if ( bOptExtension )
|
if ( bOptExtension )
|
||||||
{
|
{
|
||||||
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpace(dbRoot)
|
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpaceDisabled(dbRoot)
|
||||||
&& m_compressionType) ? bOptExtension : false;
|
&& m_compressionType) ? bOptExtension : false;
|
||||||
}
|
}
|
||||||
// Reduce number of blocks allocated for abbreviated extents thus
|
// Reduce number of blocks allocated for abbreviated extents thus
|
||||||
|
Reference in New Issue
Block a user