FLAIM changes. RFL was truncating the log smaller than the minimum file extend size. This was resulting in a lot of overhead because we would subsequently extend the RFL file when writing.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@661 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
ahodgkinson
2006-07-13 17:43:42 +00:00
parent db572b3b69
commit ad14af3a6e
2 changed files with 22 additions and 19 deletions

View File

@@ -1094,11 +1094,6 @@ RCODE F_Rfl::createFile(
goto Exit;
}
// Delete the file if it already exists - don't care about return code
// here
(void) gv_FlmSysData.pFileSystem->deleteFile( szRflFileName);
// If DB is 4.3 or greater and we are in the same directory as our
// database files, see if we need to create the subdirectory.
// Otherwise, the RFL directory should already have been created. If
@@ -1108,7 +1103,6 @@ RCODE F_Rfl::createFile(
if (m_bCreateRflDir)
{
// If it already exists, don't attempt to create it.
if (RC_BAD( rc = gv_FlmSysData.pFileSystem->doesFileExist( m_szRflDir)))
@@ -1133,10 +1127,26 @@ RCODE F_Rfl::createFile(
f_assert( !m_pFileHdl);
if (RC_BAD( rc = gv_FlmSysData.pFileSystem->createFile( szRflFileName,
gv_FlmSysData.uiFileCreateFlags, &m_pFileHdl)))
if( RC_BAD( rc = gv_FlmSysData.pFileSystem->openFile( szRflFileName,
gv_FlmSysData.uiFileOpenFlags, &m_pFileHdl)))
{
goto Exit;
if( rc != FERR_IO_PATH_NOT_FOUND)
{
goto Exit;
}
if( RC_BAD( rc = gv_FlmSysData.pFileSystem->createFile( szRflFileName,
gv_FlmSysData.uiFileCreateFlags, &m_pFileHdl)))
{
goto Exit;
}
}
else
{
if( RC_BAD( rc = m_pFileHdl->truncate( m_pFile->uiFileExtendSize)))
{
goto Exit;
}
}
m_pFileHdl->setMaxAutoExtendSize( m_uiRflMaxFileSize);