[PATCH v3 1/5] wal: preallocate disk space before writing rows

Vladimir Davydov vdavydov.dev at gmail.com
Thu Oct 25 12:24:21 MSK 2018


On Wed, Oct 24, 2018 at 08:08:23PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [18/10/24 16:43]:
> > This function introduces a new xlog method xlog_fallocate() that makes
> > sure that the requested amount of disk space is available at the current
> > write position. It does that with posix_fallocate(). The new method is
> > called before writing anything to WAL, see wal_fallocate(). In order not
> > to invoke the system call too often, wal_fallocate() allocates disk
> > space in big chunks (1 MB).
> > 
> > The reason why I'm doing this is that I want to have a single and
> > clearly defined point in the code to handle ENOSPC errors, where
> > I could delete old WALs and retry (this is what #3397 is about).
> > 
> > Needed for #3397
> 
> Thank you for taking into account the comments. Please push.

Pushed to 1.10-features



More information about the Tarantool-patches mailing list