You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-498. Segment files extension uses fallocate() now to optimize load put on SSD disks.
This commit is contained in:
@ -279,4 +279,21 @@ int BufferedFile::close()
|
||||
return ret;
|
||||
}
|
||||
|
||||
int BufferedFile::fallocate(int mode, off64_t offset, off64_t length)
|
||||
{
|
||||
int ret = 0;
|
||||
int savedErrno = 0;
|
||||
|
||||
ret = ::fallocate( fileno(m_fp), mode, offset, length );
|
||||
savedErrno = errno;
|
||||
|
||||
if ( ret == -1 && IDBLogger::isEnabled() )
|
||||
{
|
||||
IDBLogger::logNoArg(m_fname, this, "fallocate", errno);
|
||||
}
|
||||
|
||||
errno = savedErrno;
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user