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
|
||||
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)
|
||||
ENDIF( WITH_SHARED_COMP_TESTS )
|
||||
|
||||
|
@ -296,10 +296,9 @@ void IDBPolicy::configIDBPolicy()
|
||||
|
||||
if ( setting.length() != 0 )
|
||||
{
|
||||
if ( setting.size() == 3
|
||||
if ( setting.size() == 2
|
||||
&& ( setting[0] == 'O' || setting[0] == 'o' )
|
||||
&& ( setting[1] == 'F' || setting[1] == 'f' )
|
||||
&& ( setting[2] == 'F' || setting[2] == 'f' )
|
||||
&& ( setting[1] == 'N' || setting[1] == 'n' )
|
||||
)
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
/**
|
||||
* 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
|
||||
@ -137,7 +137,7 @@ public:
|
||||
/**
|
||||
* This is used in WE shared components Unit Tests
|
||||
*/
|
||||
static void setPreallocSpace(uint16_t dbRoot);
|
||||
static void enablePreallocSpace(uint16_t dbRoot);
|
||||
|
||||
private:
|
||||
/**
|
||||
@ -178,11 +178,11 @@ bool IDBPolicy::useCloud()
|
||||
|
||||
// MCOL-498 Looking for dbRoot in the List set in configIDBPolicy.
|
||||
inline
|
||||
bool IDBPolicy::PreallocSpace(uint16_t dbRoot)
|
||||
bool IDBPolicy::PreallocSpaceDisabled(uint16_t dbRoot)
|
||||
{
|
||||
std::vector<uint16_t>::iterator dbRootIter =
|
||||
find(s_PreallocSpace.begin(), s_PreallocSpace.end(), dbRoot);
|
||||
return dbRootIter != s_PreallocSpace.end();
|
||||
return dbRootIter == s_PreallocSpace.end();
|
||||
}
|
||||
|
||||
inline
|
||||
|
@ -1017,7 +1017,7 @@ public:
|
||||
|
||||
|
||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||
CPPUNIT_ASSERT(bFile->size() == 67108864);
|
||||
CPPUNIT_ASSERT(bFile->size() == 2105344);
|
||||
fileOp.closeFile(pFile);
|
||||
// file has been extended delete the file before
|
||||
// the second run
|
||||
@ -1046,8 +1046,8 @@ public:
|
||||
bFile = new idbdatafile::BufferedFile(fileName, "r+b", 0);
|
||||
pFile = dynamic_cast<IDBDataFile*>(bFile);
|
||||
|
||||
// disable disk space preallocation and extend
|
||||
idbdatafile::IDBPolicy::setPreallocSpace(dbRoot);
|
||||
// enable disk space preallocation and extend
|
||||
idbdatafile::IDBPolicy::enablePreallocSpace(dbRoot);
|
||||
rc = fileOp.initColumnExtent(pFile,
|
||||
dbRoot,
|
||||
BYTE_PER_BLOCK, // number of blocks
|
||||
@ -1060,7 +1060,7 @@ public:
|
||||
|
||||
|
||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||
CPPUNIT_ASSERT(bFile->size() == 2105344);
|
||||
CPPUNIT_ASSERT(bFile->size() == 67108864);
|
||||
fileOp.closeFile(pFile);
|
||||
// file has been extended
|
||||
|
||||
@ -1114,7 +1114,7 @@ public:
|
||||
false,
|
||||
false ); //enable preallocation
|
||||
// Check the file size and remove the file
|
||||
CPPUNIT_ASSERT(bFile->size() == 67379200);
|
||||
CPPUNIT_ASSERT(bFile->size() == 483328);
|
||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||
fileOp.deleteFile( fileName );
|
||||
CPPUNIT_ASSERT(fileOp.exists( fileName ) == false);
|
||||
@ -1129,8 +1129,8 @@ public:
|
||||
bFile = (idbdatafile::BufferedFile*)m_dFile;
|
||||
CPPUNIT_ASSERT(m_dFile != NULL);
|
||||
|
||||
// disable preallocation and create a Dictionary
|
||||
idbdatafile::IDBPolicy::setPreallocSpace(dbRoot);
|
||||
// enable preallocation and create a Dictionary
|
||||
idbdatafile::IDBPolicy::enablePreallocSpace(dbRoot);
|
||||
m_Dctnry.compressionType(1);
|
||||
rc = m_Dctnry.initDctnryExtent( m_dFile,
|
||||
dbRoot,
|
||||
@ -1141,7 +1141,7 @@ public:
|
||||
true ); //skip preallocation
|
||||
|
||||
// Check the size and remove the file.
|
||||
CPPUNIT_ASSERT(bFile->size() == 483328);
|
||||
CPPUNIT_ASSERT(bFile->size() == 67379200);
|
||||
CPPUNIT_ASSERT(rc == NO_ERROR);
|
||||
fileOp.deleteFile(fileName);
|
||||
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.
|
||||
if ( bOptExtension )
|
||||
{
|
||||
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpace(dbRoot))
|
||||
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpaceDisabled(dbRoot))
|
||||
? bOptExtension : false;
|
||||
}
|
||||
// Reduce number of blocks allocated for abbreviated extents thus
|
||||
@ -1849,7 +1849,7 @@ int FileOp::initDctnryExtent(
|
||||
// CS doesn't optimize non-compressed dict creation.
|
||||
if ( bOptExtension )
|
||||
{
|
||||
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpace(dbRoot)
|
||||
bOptExtension = (idbdatafile::IDBPolicy::PreallocSpaceDisabled(dbRoot)
|
||||
&& m_compressionType) ? bOptExtension : false;
|
||||
}
|
||||
// Reduce number of blocks allocated for abbreviated extents thus
|
||||
|
Reference in New Issue
Block a user